Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Commandline copy with Wildcard mask 2

Status
Not open for further replies.

lameid

Programmer
Jan 31, 2001
4,207
US
I have files named like

longText1.ext
longText2.ext
....


I want to copies like...

longText1VerB.ext
longText2VerB.ext
....

From dos days I expect eh following to work...


Code:
copy *.ext *VerB.ext
What this makes is files named...

longText1.extVerB.ext
longText2.extVerB.ext

So the question is what can I do instead? This seems like it should be really simple.

I did run across but I did not see the solution there but it is at least somewhat illuminating.
 
I think we have a winner...

Well done, madonnac... It worked for me perfectly, except I would just add that there is an extra dot... I believe it should be:
for %A in (*.ext) do ren %A %~nAVerA%~xA

I was not aware at all those tilde options. Have a star!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top