Copy a file in VBScript and append a date
By nater

dim strDate
dim objShell
dim objFSO

strDate=Replace(Left(Now(),Instr(Now()," ")-1),"/","-")

Set objFSO = CreateObject("Scripting.FileSystemObject")
msgbox strDate

'objFSO.CopyFile "c:\dir1\file1.xls","c:\dir1\dir2\bak1_" & strDate & ".xls"

set objFSO = Nothing

Rating:


0/5 based on 0 votes. The median rating is 0.

Submitted: 11/19/10 (Edited 11/19/10)

Description: This will copy a file and label it with the date. Good for Backing up a file.

Tags:

Views: 49 views. Averaging 0 views per day.
In the most recent 30 day period, there've been 0 views.

Similar Articles:
Sprint Will 'Zero Rate' Copa América
Sprint Will 'Zero Rate' Copa América
Verizon iPad On The Way - Though no date or price
ViaSat 1 Satellite Gets Launch Date - After Three
Verizon iPad On The Way - Though no date or price

Previous Article | Next Article