Hi, I'm using the sapienftp dll and it is inserting a CR character in my ASCII file transfers around every 400 characters.
Previously I have seen this when sending ASCII files in Binary mode.
How can I set the put statement to use ASCII mode or Binary mode?
This is my current put statement.
If oftp.put(FSO.GetFileName(objFile), file) = 0 Then
Cheers KezMan
FTP Control Acsii or Binary
FTP Control Acsii or Binary
The current version of the control doesn't have a method to change the transfer mode.
- justin.haas@motorola.com
- Posts: 1
- Last visit: Sun Mar 01, 2009 11:19 pm
FTP Control Acsii or Binary
Here's a snippet I've used to convert a Windows text file to UNIX format. It works in my situation, but you can test it out in yours.------------------------------------------------------------------
Set sOFile = oFSO.OpenTextFile(sLckFile,FORREADING,True)sRFile = sOFile.ReadAllsOFile.CloseSet sOFile = Nothings0 = Replace(sRFile, vbCrLf, vbLf, 1, -1, 0)Set sOFile = oFSO.CreateTextFile(sFile, True)sOFile.Write s0sOFile.CloseSet sOFile = Nothing------------------------------------------------------------------
Set sOFile = oFSO.OpenTextFile(sLckFile,FORREADING,True)sRFile = sOFile.ReadAllsOFile.CloseSet sOFile = Nothings0 = Replace(sRFile, vbCrLf, vbLf, 1, -1, 0)Set sOFile = oFSO.CreateTextFile(sFile, True)sOFile.Write s0sOFile.CloseSet sOFile = Nothing------------------------------------------------------------------
- cliffdodger
- Posts: 1
- Last visit: Tue Apr 14, 2009 6:32 am
FTP Control Acsii or Binary
You can find open source windows and linux/unix apps to do the same.Do a quick google search for 'dos2unix' and 'unix2dos'Cheers