troubleshooting Question

Script to rename file based on date

Avatar of IT CAMPER
IT CAMPERFlag for United States of America asked on
VB Script
12 Comments1 Solution67 ViewsLast Modified:
I need to schedule a script to run each day that checks a specific UNC location for a file, based on the current date, and then renames the file. The file to check would be for the next day, so as an example, today is 200430 (YYMMDD) and so the script would need to look for file (tomorrow's date) 200501.log_PROCESSED. If the file is found then it needs to rename to 200501.log. I'd also like to manually run a version of this script that also is able to check more than one day into the future and rename. So on execution it can ask how many days to check. If I enter 3 then it will check for and rename 200501.log_PROCESSED, 200502.log_PROCESSED and 200503.log_PROCESSED.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros