I'm looking (if possible) for a check and copy batch script that I can run remotely to check multiple directories and copy the newest modified date.
To clarify: On the remote machine I'm looking at a potential five folders (that may or may not be there). I need the script to check the last modified date of two sub-folders (Desktop and Internet Favorites) of a user's potential 5 profiles, then pick the most recent modified date and copy the folders to another location
So pathway looks like:
"\\%asset%\c$\documents and settings\%username%\Desktop"
"\\%asset%\c$\documents and settings\%username%\Favorites"
To check the date and compare it with (potentially)
"\\%asset%\c$\documents and settings\%username%.temp\Desktop"
"\\%asset%\c$\documents and settings\%username%.temp\Favorites"
Or
"\\%asset%\c$\documents and settings\%username%.temp001\Desktop"
"\\%asset%\c$\documents and settings\%username%.temp001\Favorites"
Once it has found the sub-folders with the most recent modified date to copy (only the most recent) to:
"\\%asset%\c$\documents and settings\Backup"
I know I can get the check done on one location, but I don't know how to ask batch to run multiple checks and then to pick the most recent.
Is that actually possible or am I trying this in the wrong language? I've gotten every thing but the check written out and that's where I'm getting stuck...
Any help would be appreciated!