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"