Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ftp batch file 1

Status
Not open for further replies.

gchen

Programmer
Nov 14, 2002
174
US
Hello there!

Need some help to achieve automated ftp process from windows 2000 to -

1. login a designated ftp host using specific username and passwd;
2. cd to a specific directory;
3. put an named ascii file from my local windows to remote host;
4. bye

can this be done from DOS command line? or a .bat?

Thanks a million!


 
This can be done. However there may be details you need to input, for eg, where is your file located on your system, are you uploading to the root of the ftp server or a subdirectory. This place should answer your question and help you learn as well :)

It has a sample batch file that works towards the end, just make sure your details are correct. Your option for transfer method for eg will be ascii not binary.



Claudius (What certifications??)
 
Generally you would put the batch file in a secure location with NTFS permission allowing very limited access (administrators only). The only issue would be someone with a port sniffer on your network will be able to see the username/password if they were capturing packets when the script ran. This would be true if you were doing it manually as well.

If you are really concerned, you can have a look at secure ftp - lots of details if you do a search.





Claudius (What certifications??)
 
Hi Claudius,

it is cool! the -s switch sure does the trick. it's all i wanted and thanks a lot!

Gary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top