VBScript to set file Last Modified date as another file
Posted on 2011-03-01
This is a further request from my original question.
In my work I take many video files as records using digital camera. Then I convert them to MP4 to save space, then I will delete the original MOV files. However, all video converters I've tried lack the ability to keep the output files' Last Modified Date as the original input files'.
I've tried many different programs (SetFileDate, FileDate etc.) but they all set file date to a particular or relative date/time, not using the date from another file. (The Linux TOUCH tool seems able to do this, but the Windows versions lack this function)
In my scenario, after conversion, the original and output video files are typically of same file name and in same folder, but have different extensions:
Is there a way to scan all the MP4 files in a folder and copy the Last Modified Date from the corresponding (i.e. same filename, different extension) MOV?
I hope the script can be case insensitive to filename extension, and can be optionally set to process the files in the folder in which the script is in, so that I can just copy the script to the video folder and run from there.
Also, I hope it is easy to change the extensions (MOV, MP4) in the script.
I use WinXP and Win7.