Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
FTP in a batch file
Name: gerryvr Date: January 25, 2008 at 13:04:47 Pacific OS: Windows 2003 CPU/Ram: 3GHz/2GB Product: Dell
Comment:
I need to automatically ftp from my server to a different one (serverB). I get path errors every time I try. These batch files are located in c:\bats on my server. I can manually ftp the file, so I know the connection works.
The text of my ftpserverB.bat is: start ftp -s:fileX.txt 123.45.678.90
The text of my fileX.txt is: loginname password put d:\...(path to file to be transferred) bye
Name: jefro Date: January 25, 2008 at 14:29:34 Pacific
Reply:
I think you need to use something like "say".
I read it wrong and answer it wrong too. So get off my case you peanut.
0
Response Number 2
Name: seikan Date: January 27, 2008 at 17:13:21 Pacific
Reply:
Dear gerryvr,
Try the following -
ftpserverB.bat: ftp -s:FileX.txt
FileX.txt: open 123.45.678.90 loginname password lcd *path to file to be transferred* cd *optional path to destination if required* put *file* bye
Hopefully this may be of some help to you.
All the best, Jonathan
0
Response Number 3
Name: gerryvr Date: January 28, 2008 at 10:35:41 Pacific
Reply:
Thanks to both of you, but still no luck. I did find a clue. I used Wordpad to write the batch files, and was always viewing them in Wordpad. Well, I dug deep for my old edlin commands and viewed the files at the command prompt. Both files had what looked like formatting codes embedded in them. I wrote two new files using Notepad, and they view without the formatting codes.
I still have had no luck in automating that file send. I don't get the same path errors as before, but the command window zips by and closes so fast that I cannot read what's happening. Do you know the switch/command to make that file run one line at a time? Gerry
0
Response Number 4
Name: lwcomputing Date: January 29, 2008 at 00:57:07 Pacific
Reply:
johnathan's should work.
What are your errors when you use his (note- on his, skip the the "open" line as you're doing that in the command.
Summary: Hi all, how can I possibly check windows server port availability in a batch file? I would like to check whether if the port is available, and if it is, try to start another batch file. The command t...
Summary: I need to run a batch command (or several in a batch file) that will only move one (the oldest) file in a folder with multiple files in it to another folder. Any help would be appreciated! ...
Summary: hi all, i need to write a batch file in win 2003 server machine which checks whether a file exist in a unix machine. For example: Honda is my windows machine. I need to right a batch file filecheck.ba...