October 5, 200520 yr I've got another small batch file job that I'm hoping people can help me out with.I'm trying to create a batch file that will take all the non-links from the desktop and move them to a folder, including directories.This is what I've got so far...@echo off&setlocal enableextensionsset src=C:\Documents and Settings\Administrator\Desktopset dest=C:\Documents and Settings\Administrator\My Documents\Desktoppushd %src%for /f "tokens=*" %%a in ('dir/b/a') do ( IF /I %%~xa NEQ .lnk ( robocopy %%a %dest% /S /MOVE>nul ))popd&endlocal&goto :eofWhen I run this... nothing happens... Any ideas/suggestions would be appreciated.
October 6, 200520 yr You can just use the exclude option in robocopy, for example:@echo offset src=C:\Documents and Settings\Administrator\Desktopset dest=C:\Documents and Settings\Administrator\My Documents\Desktoprobocopy "%src%" "%dest%" /copyall /mov /xf *.lnk /r:30 /w:10>nulgoto :eof<Edit>Replaced my test dirs with your %src% and %dest%</Edit> Edited October 6, 200520 yr by Yzöwl
October 6, 200520 yr what's included in XP? 'robocopy' is not recognized as an internal or external command,operable program or batch file.
October 6, 200520 yr Author what's included in XP? 'robocopy' is not recognized as an internal or external command,operable program or batch file.Wierd... I've got it on my laptop and I haven't installed any extra packs... Maybe it's XP Pro?
Create an account or sign in to comment