J Trahair
Well-known member
Hi. I am using the following code to upload a file from the desktop to an ftp site. On downloading the same file from the ftp site, I find the file has extra line feeds that weren't in the uploaded file.
where strThisFileNameOnly is (for example) "MyTextFile.csv", and strThisFilePathAndName = "C:\MyFolder\MyTextFile.csv".
The file contents when it is uploaded:
Any ideas how I can remove the unwanted line spacing, preferably by another command in the 'client' code line. Of course, I can read the file, replace a double vbCrLf with a single one, then rewrite the file, but that is a bad fudge (IMO).
Thank you.
VB.NET:
client.UploadFile("ftp://myfiles.myftp.net.uk/www.mydomain.co.uk/httpdocs/FolderName/" & strThisFileNameOnly, strThisFilePathAndName)
The file contents when it is uploaded:
the file contents after upload and subsequent download are:T,02/10/2014 17:13:27,,PTX7545,1234,30,1,6,04CC1759E42584,418,-7,1,x
T,02/10/2014 17:13:38,,PTX7545,1234,30,1,4,04E2D551E42580,50,-5,1,x
T,02/10/2014 17:13:47,,PTX7545,1234,30,1,6,04CC1759E42584,411,-7,1,x
T,02/10/2014 17:13:56,,PTX7545,1234,30,1,4,04E2D551E42580,45,-5,1,x
T,02/10/2014 17:14:06,,PTX7545,1234,30,1,6,04CC1759E42584,404,-7,1,x
T,02/10/2014 17:13:27,,PTX7545,1234,30,1,6,04CC1759E42584,418,-7,1,x
T,02/10/2014 17:13:38,,PTX7545,1234,30,1,4,04E2D551E42580,50,-5,1,x
T,02/10/2014 17:13:47,,PTX7545,1234,30,1,6,04CC1759E42584,411,-7,1,x
T,02/10/2014 17:13:56,,PTX7545,1234,30,1,4,04E2D551E42580,45,-5,1,x
T,02/10/2014 17:14:06,,PTX7545,1234,30,1,6,04CC1759E42584,404,-7,1,x
Any ideas how I can remove the unwanted line spacing, preferably by another command in the 'client' code line. Of course, I can read the file, replace a double vbCrLf with a single one, then rewrite the file, but that is a bad fudge (IMO).
Thank you.