SStory
asked on
FOR command and SET command in a batch file
I have the copy part working due to an answer in a previous question
FOR %%A IN (%*) DO (
rem copy the file
COPY %%A "%temp%\~1234WSS4321\%%~nx A"
SET X=%X% %%~nxA
)
the set part does not work.... why? How can I do it.
I need the environment variable to =
filename1.tif filename2.tif filenamex.tif
FOR %%A IN (%*) DO (
rem copy the file
COPY %%A "%temp%\~1234WSS4321\%%~nx
SET X=%X% %%~nxA
)
the set part does not work.... why? How can I do it.
I need the environment variable to =
filename1.tif filename2.tif filenamex.tif
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Oops... Sorry.. At first I thought it wasn't work. I had && instead of %%
Disreguard the comment in the above and read the code snippet..
I goofed.
Thanks.
Disreguard the comment in the above and read the code snippet..
I goofed.
Thanks.
ASKER
Awesome! You have made my day! I looked at lots of docs and help but just
couldn't get it. Now my TIFFS to PDF will work for users in a simple way.
Thanks again!
couldn't get it. Now my TIFFS to PDF will work for users in a simple way.
Thanks again!
ASKER
I am getting:
'~nxA' is not recognized as an internal or external command,
operable program or batch file.
Open in new window