Quantcast
Channel: For loop in batch file not moving file - Super User
Viewing all articles
Browse latest Browse all 2

For loop in batch file not moving file

$
0
0

I am looping through a particular directory and if a zip file or files exist they are moved to a secondary folder in that directory however the code below doesn't seem to work i.e. it doesn't move the file. What am I doing wrong?

for %%i in (D:\test\*.*) do if %%~xi == ".zip" move /Y "D:\test\%%~ni%%~xi""D:\test\complete"


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images