Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.
@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
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
12 Experts available now in Live!