Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Does anyone know if there is anyway after using a batch file to ftp into a server and then using the mput command to have it timeout if it gets stuck on a file transfer and move on to the next file. Also, does anyone know if there is anyway using the mput command to create a log of the files transfered, to see which files are successful and which failed? I have my code done to automatically transfer files, but if the internet connetion fails, I would like to log which files are transfered and timeout if necessary. Thanks anyone for help.

I've tried various things in the past, but I've never had much success. I hope your search goes better than mine.

This will make a log:
::==
@echo off> ft.do echo o triangle.com
>> ft.do echo user
>> ft.do echo pass
>> ft.do echo bin
>> ft.do echo cd mydir
>> ft.do echo prompt
>> ft.do echo mput *.bat
>> ft.do echo mput *.jpg
>> ft.do echo byeftp -s:ft.do > log
=====================================
If at first you don't succeed, you're about average.M2

Thanks Mechanix2Go for the log file, that helps a lot I really appreciate it. Do you know if it is possible to have a timeout feature too? I don't even think its possible, but I really thank you for your help.

No idea how to provide a timeout.
=====================================
If at first you don't succeed, you're about average.M2

Launch the script in which you do the FTP, in a seperate DOS-Window, ex.
--------
@echo offecho This is script...
start FTP-script.cmd<command that waits for X seconds/minutes/hours>
kill the script called "FTP-script.cmd"
--------
There's ways to have the above wait command not having to be completed, if the FTP-actually completed quickly, but the above will work.Make the name of the FTP-script as specific as you can, because you will be killing any script with the same name ...
Kill may not be standard Windows ... well, you know the drill, Google = your fiend
Hi there.

Yes, I appreciate that idea and it makes sense for killing the whole script. However, I don't need the script to be killed.
I would like a way to skip a file if it can't be uploaded in say 10 seconds and move on to the next file. I've been searching google for a long time too, and it doesn't seem possible. Thanks everyone for your help.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |