troubleshooting Question

Scripting adding 8 minutes to a timestamp

Avatar of Sh M
Sh MFlag for United States of America asked on
Scripting Languages
3 Comments2 Solutions109 ViewsLast Modified:
I have the following script generating a time stamp which is used to name a file.
I like to add 7 extra minutes to any generated time stamp.

Here is the code:
Set stmp=
For /f "tokens=* skip=1" %%a in (' wmic os get localdatetime ') do (
Set stmp=%%a
Set stmp=!stmp:~0,8!_stmp:~8,4!
Then I set my folder name using this time stamp:
Set fildername= xxxxx_ %smtp% however I like to add 5 minutes to this %smtp% later. How can it be done?

Thanks in advance
Join our community to see this answer!
Unlock 2 Answers and 3 Comments.
Start Free Trial
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 2 Answers and 3 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