How to set ascii mode in FTP using .netrc
if I have a .netrc file that looks something like this:
machine fl.address.net login myname and I wanted to make it so that when I hit ftp fl.address.net it will open the connection, prompt for my password, and then automatically set the transfer mode to ascii. How can I do this? Maybe I dont need to add it to my .netrc file, I dunno Thanks for your help ! |
I'm afraid you can't!
They only possibility I see for you is to define a macro in your .netrc file that will first set type to ascii and then transfer the files you want. To define a macro, type the following in the line just after your "machine...": macdef <name> ascii <commands> Don't forget to leave a blank line after your macro, it tells ftp where your macro stops. And if you want your macro to be automatically executed at auto-login, you have to set the macro name to "init". And you can also set your passwd in your .netrc file directly, did you know? Hope this helps! Cheers |
All times are GMT -5. The time now is 10:10 PM. |