Ready to get started with anonymous questions today? It's easy! Learn more.
@ECHO OFF goto :EndOfRemarks --- remarks section --- desired process: loop wait 2 minutes select directory (if exists) from receiver move selected directory to results end loop --- end remarks section --- :EndOfRemarks SETLOCAL ENABLEDELAYEDEXPANSION SET BaseDir="C:\task\receiver" SET DestDir="C:\task\results" SET resultDir= SET resultDirrace= SET resultDirborra= FOR /D %%F IN (%BaseDir%\*.*) DO ( TIMEOUT /T 2 /NOBREAK SET resultDir="%%F" SET resultDirborra=%%F SET resultDirrace="%%~nxF" MOVE /Y !resultDir! %DestDir% REM DEL !resultDirborra!\*.* /S /F /Q timeout /T 1 /nobreak REM rd /s /q !resultDir! ECHO ... Directory moved: !resultDirrace! ) REM explicitly end local changes caused by script (optional) REM done implicitly at end of script if not specified ENDLOCAL massive.bat
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.