FTP ACSII Binary - auto detection

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
BlackWisdom
Pro Scripter
Posts: 58
Joined: Thu Oct 16, 2003 12:53 am

FTP ACSII Binary - auto detection

Post by BlackWisdom » Fri Oct 26, 2007 6:16 pm

Ok guys
I am using MacSched ver 7.09. I have read the help files and search the forum but I cant find an answer to this question.

Does FTP automatically adjust to Binary and / or ASCII.

I know there are switches for both in the command, but is there a way to make the detection automatic. If not, I guess I can read the file ext and call on the label that supports the file type.

I am currently using a file manifest (in the form of a text file) that the FTP command is reading. So I could use Mid / Pos to read the string and based on the file ext – call on the correct mode – am I close…???

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Oct 26, 2007 7:16 pm

I'm not an expert on FTP, Haven't had to use it for nearly 20 years. But... from the info I read here it sounds like a binary transfer copies a file as is but an ASCII transfer copies a file and makes changes to the file to accommodate unix versus windows "text" formats. In other words if you are going from windows to Unix it removes the carriage returns and if you are going from Unix to Windows it installs carriage returns. You could perform these tasks within your script, then transfer all files as binary.

Or if the files are just being stored on a unix box, transfer them as binary both directions without making any changes to the files and your windows machine will never know the difference.

BlackWisdom
Pro Scripter
Posts: 58
Joined: Thu Oct 16, 2003 12:53 am

Post by BlackWisdom » Fri Oct 26, 2007 8:02 pm

Thanks - JRL

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts