Hi all,
Am running Windows 2003 server.
I use an SFTP service to download mysql dumps to an analysis server, I have no control over the SFTP downloading service.
The data is downloaded daily, each day a new folder with the days date as its name is created and the dumps contained within for downloading -
\2009-06-01\*.bz2
\2009-06-02\*.bz2
\2009-06-03\*.bz2
... etc etc
I sync the data to my server as -
\2009-06-01\*.bz2
\2009-06-02\*.bz2
\2009-06-03\*.bz2
... etc etc
Issue is I need to copy the contents of the latest folder I downloaded to a temp location so that it can be extracted and imported into mySQL (all automated). I can't however work out how to script a copy process (using dos commands as my vbs is very poor) to identify the latest folder using 12hr time parameters to then copy without copying its root folder as well (IE the 2009-06-01 folder that they are saved to on the destination which I don't want).
Can anyone help please, I looked at XCopy but it won't copy the files without creating the folder they originally sat in. If I can get xcopy to copy folder contents to destination without creating source folder they originally resided in then problem is solved).
Ideally looking for vbs script to identify a folder located in d:\datadumps\.. that was created within 24hrs and copy its contents to another folder on OS without creating source folder on destination as well.
IE
one day copy - D:\datadumps\2009-06-01\* to d:\ddextraction\*
next day copy - D:\datadumps\2009-06-02\* to d:\ddextraction\*
etc etc
Many thanks!