Dos batch script and ftp

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
gmgenova
Posts: 2
Joined: 22 Nov 2011 12:31

Dos batch script and ftp

#1 Post by gmgenova » 22 Nov 2011 12:37

I have a dos batch script that uses ftp do get a file. If the file is empty, it still pulls a file with 0 bytes. Is there an automated way for me to either:

1. not get the file in the first place or
2. delete the file with 0 bytes right after it is retrieved

I have searched around for a while and have not found a solution thus far. Any information is appreciated. Thank you.

gmgenova
Posts: 2
Joined: 22 Nov 2011 12:31

Re: Dos batch script and ftp

#2 Post by gmgenova » 22 Nov 2011 14:43

I guess I did not word my initial post correctly. When the file does not exist, the get command was still working in such a way that a file was being created with 0 bytes. I used the mget command and it does not create a file with 0 bytes if the file does not exist. So my solution is to use mget instead of get. :D

Post Reply