I was using two for loops with the move command, once for directories and once for files, but I couldn't get it to work.
Should I use robocopy, or what is the best way to do this?
This is what I was using before, before I realised that it wasn't keeping the directory structure.
Code: Select all
if exist %USERPROFILE%\.config ( for /f "tokens=*" %%a in ('dir /s /b "%USERPROFILE%\.config\*"') do move /y "%%~a" "%USERPROFILE%\winfiles\Settings\.config\" rmdir %USERPROFILE%\.config )