How can I only have a single move command in a batch file?
- by PeanutsMonkey
I have an existing batch file that attempts to move files from 2 directories to 2 different locations. At the moment these are called as 2 separate move commands. I am wanting to simply the code further and was wondering if there was a way to do so
@echo off
for %%a in (C:\Test\*.*) do if "%%~xa" == "" move /Y "C:\Test\%%~na%%~xa" "D:\Done"
for %%i in (C:\Sample\*.*) do if "%%~xi" == "" move /Y "C:\Sample\%%~ni%%~xi" "D:\Done"