|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
Sorry I have very little experience with Window's scripting...can anyone help me with this script? I need a script that will look at a folder and move files that were created on a certain date to another folder. Also can this script be scheduled by any chance? Thanks so much! Any help would be appreciated! |
|
#2
|
|||
|
|||
|
The filesystem object is what you need to use.
http://msdn2.microsoft.com/en-us/library/hww8txat.aspx As you wander through the documentation you'll find example script snippets that should get you on your way. And yes, once your script is written and debugged you can schedule it with the task scheduler.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
||||
|
||||
|
Doug is exactly right. The FileSystemObject can easily be used to process files based on age. Read any of my articles below to see examples of age-based file processing. Try using the script from the first article and replacing the Delete method with a Move instead.
![]() Age-Based File Deletion in WSH Set Archive Bit Based on Creation Date in WSH
__________________
Click the image if at any point you don't like my decision.Scripting problems? Windows questions? Ask the Windows Guru! |
|
#4
|
||||
|
||||
|
Oh, and a few suggestions for creating a script to run as a Scheduled Task....
Do not use environmental variables. These are not supported in Scheduled scripts. Avoid using mapped drive letters for network locations. Instead, use full UNC paths. Good luck. |
|
#5
|
|||
|
|||
|
Thank You!
|
![]() |
| Viewing: ASP Free Forums > System Administration > Windows Scripting > General Scripting - Need help on a windows script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|