darren77uk
IS-IT--Management
Can anyone tell me how I can write a basic script to take a specific file on a daily basis, copy rename it as something else with a datestamp?
Would appreciate that.
Cheers.
Would appreciate that.
Cheers.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
const src_Folder="d:\test\"
const trgt_Folder="d:\test\"
const src_Filename="abc.txt"
const separator="-"
dtData=date 'or whatever you have in mind e.g. #mm/dd/yyyy# highly localized data
'dtData=#2/13/2004#
stmpDate=cstr(dtData)
'wscript.echo stmpDate
stmpDate=replace(stmpDate,"/",separator) & separator
'wscript.echo stmpDate
set fso=createobject("scripting.filesystemobject")
fso.copyfile srcFolder & src_Filename, trgt_Folder & stmpDate & src_Filename
set fso=nothing