FTP Control Acsii or Binary

This forum can be browsed by the general public. Posting is no longer allowed as the product has been discontinued.
This topic is 14 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
kezman
Posts: 1
Last visit: Wed Oct 15, 2008 7:46 pm

FTP Control Acsii or Binary

Post by kezman »

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
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

FTP Control Acsii or Binary

Post by jhicks »

The current version of the control doesn't have a method to change the transfer mode.
User avatar
justin.haas@motorola.com
Posts: 1
Last visit: Sun Mar 01, 2009 11:19 pm

FTP Control Acsii or Binary

Post by justin.haas@motorola.com »

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------------------------------------------------------------------
User avatar
cliffdodger
Posts: 1
Last visit: Tue Apr 14, 2009 6:32 am

FTP Control Acsii or Binary

Post by cliffdodger »

You can find open source windows and linux/unix apps to do the same.Do a quick google search for 'dos2unix' and 'unix2dos'Cheers
This topic is 14 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.