Delayed Variable Expansion

Some of the internal commands (COPY, MOVE, PDIR, REN) support delayed variable expansion for the target filename. The function argument must be an asterisk (*),  which will be replaced by the name of each matching source file. The variable function name must be preceded by two %%'s; the first one will be removed before the command is called, and the second when the command calls the variable expansion routine. This allows much greater flexibility in building the target filenames.


For example, to copy all of your *.MP3 files,  and append the string "_saved" to the filename part :


copy *.mp3 %%@name[*]_saved.mp3