Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I rename a file to user input and then FTP it, all from a batch file?

batch file FTP input RENAME user
0
Posted

How do I rename a file to user input and then FTP it, all from a batch file?

0

I’ve done the ftp step a lot. Your batch file would contain a line like this: FTP -s:C:\misc\login.ftpand C:\misc\login.ftp would contain this (plug in appropriate values for username and password): OPEN ourserver.ourcompany.com username password ASCII HASH CD /adirectory PUT C:\tmp\ebillpmt.rpt ebillpmt.txt BYEAs the file is being transferred, a hashmark (‘#’) will be displayed every time a “chunk” (1K, 512 bytes, etc.) is transferred. You could end your batch file with something like ECHO Finished! if you wanted. As far as the input goes, as I recall, there’s no DOS command for reading from the keyboard. You could, as mphuie suggested, start the batch file with a parameter and refer to it in your batch file as %%1. Send me a message if you’d like more info – I’ll be glad to help.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123