all groups > iis ftp > july 2006 >
You're in the

iis ftp

group:

FTP: using MGET with DELE


FTP: using MGET with DELE trs51x
7/13/2006 12:00:00 AM
iis ftp:
I am trying to set up a batch file for a client to download files from a
remote FTP server a couple times per day.

Files are posted into our directory on the server periodically throughout
the day, I believe once every hour.

I would also like to "clean up after" our downloads by deleting files which
were downloaded.

Right now I am using simply:

....
MGET *.txt
DELE *.txt
....

But I am worried that a file will be posted in the time between initiation
of MGET and initiation of DELE, and then will be deleted without having been
downloaded.

This would be a rare situation probably, but I want this to be foolproof.

Besides telling the users to not run the script during the first 15 minutes
past the hour, is there some more elegant way to achieve this? (i.e.
something that involves no dependency on the user to make the right
decision!)

Thanks!

TRS

Re: using MGET with DELE Bernard Cheah [MVP]
7/13/2006 5:53:13 PM
The command is execute in sequencial order. so all the files will be
downloaded before deletion.

what about you have another step in between
a) mget the file
b) delete the \temp\ files
c) move the the current mget files to temp folder

in this case, the current mget files will always be moved to a temp folder
and will be delete in the next cycle.


--
Regards,
Bernard Cheah
http://www.iis.net/
http://www.iis-resources.com/
http://msmvps.com/blogs/bernard/


[quoted text, click to view]

Re: using MGET with DELE trs51x
7/14/2006 6:31:38 PM
Thanks for the response, Bernard.

It's a great idea!

Implementing the whole system has required me to refresh my DOS batch skills
quite a bit, so it's not up and running yet, but I'll try to stop back and
share my solution when it's complete.

Thank you!


TRS


[quoted text, click to view]


Re: using MGET with DELE Bernard Cheah [MVP]
7/15/2006 12:00:00 AM
No problem. share with us when you are done.

--
Regards,
Bernard Cheah
http://www.iis.net/
http://www.iis-resources.com/
http://msmvps.com/blogs/bernard/


[quoted text, click to view]

AddThis Social Bookmark Button