Discussion Locked

list of wild cards lime %UserName%

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am looking for a list of available wild cards for use in scripts. Specifically, Iam looking for a wildcard that will function like %SystemTime% so that I can cope ( zip) files to a file %systemTime%.zip so that one file does not overwrite the previous file.

5 replies

by joseph moore

I have the syntax to do this in a Windows BAT file. I don't know if this helps you or not, though.

There is no system time variable. But, you can run the following to do what you want:

for /f "tokens=1-4 delims=/ " %%i in ('date /t') do copy YOURFILE.ZIP %%l-%%j-%%k.ZIP

That would make a copy of YOURFILE.ZIP and call it 2002-09-03.ZIP

by rrv

I understand that you want to create unique file name for zipping. Use file system object. if a file of a given name is found, append an increment integer to the file and search again. This logic works fine and i'm using in many places.
RV

This discussion is closed to new replies.