Copy and rename on one command line
Posted: 03 Jul 2021 09:46
This is a sample script
robocopy "c:\users\test" "d:\test" "sample.txt" /xf desktop.ini /np /tee /ndl /xx
echo.
if exist "d:\test\sample.txt ren “Sample June 2021” Exit 2 ********
echo.
in the command line if exist "d:\test\sample.txt ren "Sample June 2021" Exit2
I want to copy and rename at the same time and it's not working
Can the copy and rename be on one command line, if so, how do I go about doing that?
Thanks in advance.
robocopy "c:\users\test" "d:\test" "sample.txt" /xf desktop.ini /np /tee /ndl /xx
echo.
if exist "d:\test\sample.txt ren “Sample June 2021” Exit 2 ********
echo.
in the command line if exist "d:\test\sample.txt ren "Sample June 2021" Exit2
I want to copy and rename at the same time and it's not working
Can the copy and rename be on one command line, if so, how do I go about doing that?
Thanks in advance.