I wish to create a batch file which will copy image files created in the last hour to another folder. Note I only want to copy files with a .jpg extension.
Can anyone help with this?
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Const srcDir = "c:\images" Const destDir = "c:\SomeWittyName" hourAgo = DateAdd("h", -1, Now) Set fso = CreateObject("Scripting.FileSystemObject") For Each f In fso.GetFolder(srcDir).Files If LCase(fso.GetExtensionName(f)) = "jpg" _ And f.DateLastModified > hourAgo Then _ f.Copy destDir & "" Next 'f