J
John Smith
I want to be able to create a batch file that will run daily and only move
files from c:\folder1 to c:\folder2 that contain today's date.
xcopy c:\folder1 c:\folder2 /d:3-12-2004
the above will work if I hard-code the date, but I need to be able to have
the current date. So, I tried to create a .vbs that would call the xcopy
after I put together the date:
-----------------------------------
test.vbs:
dim dDate
dim sString
Dim WshShell, oExec
dDate = FormatDateTime(Now, 2)
Set WshShell = CreateObject("WScript.Shell")
sString = "test.bat " & CStr(dDate)
Set oExec = WshShell.Exec(sString)
files from c:\folder1 to c:\folder2 that contain today's date.
xcopy c:\folder1 c:\folder2 /d:3-12-2004
the above will work if I hard-code the date, but I need to be able to have
the current date. So, I tried to create a .vbs that would call the xcopy
after I put together the date:
-----------------------------------
test.vbs:
dim dDate
dim sString
Dim WshShell, oExec
dDate = FormatDateTime(Now, 2)
Set WshShell = CreateObject("WScript.Shell")
sString = "test.bat " & CStr(dDate)
Set oExec = WshShell.Exec(sString)