Anyone know if this would be possible:
Go to a website and check a directory then download the contents of a folder with the latest date. So in the following example it would look in a given directory with the following folders and find the latest folder (in this case Folder C) and download it's contents or the folder itself:
Folder A......01-Jan-2003
Folder B......02-Jan-2003
Folder C......03-Jan-2003
So the next day it could be:
Folder A......01-Jan-2003
Folder B......02-Jan-2003
Folder C......03-Jan-2003
Folder D......04-Jan-2003
and it would then download Folder D. Perhaps this isn't the right tool to use but I couldn't find a download manager/scheduler that would do this. Any help would be appreciated.
download latest folder
Moderators: JRL, Dorian (MJT support)
Hi,
cmd=NT,W2K,XP
command=W9x,Me

Code: Select all
Run Program>cmd /k dir /B /O-D /A:D C:\Temp\*.* > C:\CDrive.txt
ReadLN>C:\CDrive.txt,1,Folder2Copy
CopyFiles>%Folder2Copy%\*.*,D:\%Folder2Copy%\*.*
command=W9x,Me

Thanks for the assist!!
Here are the small change I made to test (test4 contains 2 folders with files and test5 is an empty folder)
Run Program>cmd /k dir /B /O-D /A:D C:\test4\*.* > C:\CDrive.txt
ReadLN>C:\CDrive.txt,1,Folder2Copy
CopyFile>%Folder2Copy%\*.*,C:\test5\%Folder2Copy%\*.*
under 98 (after changing it to "command") I get:
Error Executing command /k dir /B /O-D /A:D C:\test4\*.* > C:\CDrive.txt (2)
under XP I get:
The CDrive.txt file gets created, a command prompt window pops up and that's it. No files are copied.
I can run "cmd /k dir /B /O-D /A:D C:\test4\*.* > C:\CDrive.txt " just fine outside in both cases. I'm probably doing something silly but I just can't see it
Here are the small change I made to test (test4 contains 2 folders with files and test5 is an empty folder)
Run Program>cmd /k dir /B /O-D /A:D C:\test4\*.* > C:\CDrive.txt
ReadLN>C:\CDrive.txt,1,Folder2Copy
CopyFile>%Folder2Copy%\*.*,C:\test5\%Folder2Copy%\*.*
under 98 (after changing it to "command") I get:
Error Executing command /k dir /B /O-D /A:D C:\test4\*.* > C:\CDrive.txt (2)
under XP I get:
The CDrive.txt file gets created, a command prompt window pops up and that's it. No files are copied.
I can run "cmd /k dir /B /O-D /A:D C:\test4\*.* > C:\CDrive.txt " just fine outside in both cases. I'm probably doing something silly but I just can't see it

Hi,
have a try with "xcopy" instead of the Copy File> command.
BTW: If you change the parameter /k to /c after testing, the DOSBox will disappear after the task has finished.
more info on xcopy:cmd /k xcopy /?
have a try with "xcopy" instead of the Copy File> command.
Code: Select all
Let>source=C:\test4
Let>destination=C:\test5
Run Program>cmd /k dir /B /O-D /A %source%\*.* > C:\CDrive.txt
ReadLN>C:\CDrive.txt,1,Folder2Copy
Run Program>cmd /k xcopy %source%\%Folder2Copy% %destination% /S
more info on xcopy:cmd /k xcopy /?