There are probably a couple ways you could do it, depending on what works best for you, but you'll use an ftp script, something like what is documented here:
From the same batch file, you'll need to work some magic to rename the file after you perform the GET. Here is a script I wrote to create a directory with today's date as the name, it should get you started in the right direction. Sorry I don't have the time to rewrite it for you:
echo %date% > temp.txt
for /F "tokens=1,2,3,4 delims=/ " %%1 in (temp.txt) do echo %%4-%%3-%%2 > temp2.txt
for /F %%1 in (temp2.txt) do mkdir %%1
Basically, you should be able to change the "mkdir" command to a rename command and be almost complete. You'll just need to also echo %time% to temp.txt and include the correct tokens in your FOR loop. Will probably take some experimentation to get it right.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.