Search found 2 matches
- 21 Nov 2020 22:59
- Forum: DOS Batch Forum
- Topic: Understanding this catch command set start=%time: =0%
- Replies: 2
- Views: 3437
Re: Understanding this catch command set start=%time: =0%
Thanks, I get it, current time is 22:48 so I did an echo %time:2=9% and it displayed 99:48:58:95 The place I found and copied that example (set start=%time: =0%) of time must have wanted the leading zero to do some math calculations. I just wanted to display current time, so could have just used ech...
- 21 Nov 2020 16:56
- Forum: DOS Batch Forum
- Topic: Understanding this catch command set start=%time: =0%
- Replies: 2
- Views: 3437
Understanding this catch command set start=%time: =0%
I made up a batch file in Windows 10 to backup some of my data on USB and it works fine using Xcopy. I wanted to know how long it ran as I didn't set and watch, looking around I found this command" set t2=%time: =0%. So I used replacing t2 with something more meaningful like start and end. set start...