Task Goal: Write a Macro Scheduler script to back up multiple versions of files into multiple folders, say c:\2004.12.25, c:\2004.12.26, c:\2004.12.27,....etc.
Would someone be very kind enough to show me how to CREATE and RENAME a folder with VBScript? Thanks a lot in advance.
Happy scripting. Happy New Year.
VBScript Subroutine to Create/Rename Windows Folder(s)
Moderators: JRL, Dorian (MJT support)
MJT Net Support
[email protected]
[email protected]
Hi Support,
Thanks a lot. Actually, the URL you pointed to contains all the sample scripts I need. Thanks to your help, I wrote the following script:
/* 12/28/2004 Tue 5:30:35 PM HKT*/
VBSTART
Function CreateFolder(Folder)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FolderExists(Folder)) Then
Else
Set f = fso.CreateFolder(Folder)
CreateFolder = f.Path
End If
End Function
VBEND
Let>Date=c:\Backup\2004.12.25
VBrun>Createfolder,%date%
Thanks a lot. Actually, the URL you pointed to contains all the sample scripts I need. Thanks to your help, I wrote the following script:
/* 12/28/2004 Tue 5:30:35 PM HKT*/
VBSTART
Function CreateFolder(Folder)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FolderExists(Folder)) Then
Else
Set f = fso.CreateFolder(Folder)
CreateFolder = f.Path
End If
End Function
VBEND
Let>Date=c:\Backup\2004.12.25
VBrun>Createfolder,%date%