Link to home
Start Free TrialLog in
Avatar of fanguru1
fanguru1

asked on

Batch file copy and file rename

I have a batch file that copies drawings from a file server to my HDD. See below.
copy j:\hal\synth\hsga\sheet?.dxf "c:\my documents\drawings"
This copies 4 sheets called SHEET1.DXF to SHEET4.DXF.
My question is: Is there a fairly simple routine I can add that will prompt me input a new file name to save it to without manually changing the name of each file. If I can do this in the same batch file that would be fine, or, I would really like help with a VB6 program to do the same. I could create the inteface, but would need some help with the code.
Thanks,

Jeff
Avatar of jkr
jkr
Flag of Germany image

You could try

------------------------------>8--------------------
set SRCMASK=%1
copy j:\hal\synth\hsga\%SRCMASK%?.dxf "c:\my documents\drawings"
------------------------------>8--------------------

and call the .bat like

mybat.bat SHEET
Avatar of Longbow
Longbow

Hi,

What's the difference between sheet?.dxf and SHEET1.DXF ?
Will be the source and destination foldes always the same ?
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial