I am using this code to move files from subfolders of a dir and then delete the subfolders and the dir itself. then create an empty directory with the same name for the next time, problem is if any of dir, subfolder or any file contains spaces in name they the code doesn't work else it wokrs fine for me. help running windows 7
for /R "G:\test\NEW" %%f in (*.mov) do move %%f "G:\test"
pause
@echo off
set /p a=Delete Empty folders(Y/N)
IF /I "%a%"=="y" goto first
IF /I "%a%"!="y" goto second
:first
rmdir G:\test\NEW /s /q
md "G:\test\NEW"
:second
Exit