I need to come up with a script to do the following:
I have a folder on a server in which people scan documents to PDF. The folders are simply named for the day (for example 2009-08-12 for August 12, 2009). At the end of the day, I would like to move the daily folder into a monthly folder (currently formatted as 2009-08 for August 2009). If possible, I would also like to have the script create a new monthly folder automatically (so when 2009-09-01 gets copied, a 2009-09 folder would be created if it doesn't exist).
I started trying to piece together a script from various Google searches, but my scripting kung-fu is weak, and this is as far as I got before I realized I need help...
-----------------------------------------------------------
Option Explicit
dim destination
dim sourcefolder
destination = "c:\scanusers\dataentry\completed archive\" & Year(Date) & "-" & Month(Date) & "-" & Day(Date)
sourcefolder = "c:\scanusers\dataentry\"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.CreateFolder(destination)
objFSO.MoveFolder sourcefolder, destination
-----------------------------------------------------------
I know there is lots I am missing, but I am unsure of where to go next. Any assistance would be greatly appreciated!
I have a folder on a server in which people scan documents to PDF. The folders are simply named for the day (for example 2009-08-12 for August 12, 2009). At the end of the day, I would like to move the daily folder into a monthly folder (currently formatted as 2009-08 for August 2009). If possible, I would also like to have the script create a new monthly folder automatically (so when 2009-09-01 gets copied, a 2009-09 folder would be created if it doesn't exist).
I started trying to piece together a script from various Google searches, but my scripting kung-fu is weak, and this is as far as I got before I realized I need help...
-----------------------------------------------------------
Option Explicit
dim destination
dim sourcefolder
destination = "c:\scanusers\dataentry\completed archive\" & Year(Date) & "-" & Month(Date) & "-" & Day(Date)
sourcefolder = "c:\scanusers\dataentry\"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.CreateFolder(destination)
objFSO.MoveFolder sourcefolder, destination
-----------------------------------------------------------
I know there is lots I am missing, but I am unsure of where to go next. Any assistance would be greatly appreciated!