I am supplied a varying number of files with names that are composed of a fixed segment plus an undetermined segment plus an html extension. I need to rename these files in DOS, preserving the undetermined segment (which can be assumed to be unique) while changing the fixed segment to something else and just can't figure it out.
For example:
I'm supplied files such as:
FDG_XZ_99999_variablestring.html
FDG_XZ_99999_anotherstring.html
FDG_XZ_99999_gotchastring.html
FDG_XZ_99999_random.html
FDG_XZ_99999_anothervariablestring.html
etc, where I can predict only the "FDG_XZ_99999_" and ".html" portions
I need to copy and rename them to another location using the names:
12345-1_variablestring.html
12345-1_anotherstring.html
12345-1_gotchastring.html
12345-1_random.html
12345-1_anothervariablestring.html
I've tried various combinations using the * and ? wildcards. Some of what DOESN'T work follows (but I recall it working in the old 8.3 world):
ren FDG_XZ_99999_*.html 12345-1_*.html
ren ?????????????*.html 12345-1_*.html
Can anyone out there get this to work using stock cmd shipped w/ XP Pro?
Thanks in Advance
.
For example:
I'm supplied files such as:
FDG_XZ_99999_variablestring.html
FDG_XZ_99999_anotherstring.html
FDG_XZ_99999_gotchastring.html
FDG_XZ_99999_random.html
FDG_XZ_99999_anothervariablestring.html
etc, where I can predict only the "FDG_XZ_99999_" and ".html" portions
I need to copy and rename them to another location using the names:
12345-1_variablestring.html
12345-1_anotherstring.html
12345-1_gotchastring.html
12345-1_random.html
12345-1_anothervariablestring.html
I've tried various combinations using the * and ? wildcards. Some of what DOESN'T work follows (but I recall it working in the old 8.3 world):
ren FDG_XZ_99999_*.html 12345-1_*.html
ren ?????????????*.html 12345-1_*.html
Can anyone out there get this to work using stock cmd shipped w/ XP Pro?
Thanks in Advance
.