I've got a small batch file that I want to use to copy a file from one location to many locations that may have different name.
for /D %%f in ("%%localappdata%%MicrosoftOpc*") do (
for /D %%x in ("%%f*") do (copy /y user.config %%x)
)
I'm able to get this to run fine in the command line, but if I try and run my batch script instead, this is all that's shown on the command line:
for / %f in ("%localappdata%MicrosoftOpc*") do (
for / %x in ("%f*") do (copy /y user.config %x )
)
It looks like, for whatever reason, the /D flag is getting changed into just /
I'm rather new to batch scripting, so any help would be greatly appreciated!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…