for /R .\src\ %%N in (*) do (
echo moving... "%%N"
move /Y "%%N" .\dest\
set /a noOfMovedFiles+="1"
REM Stop once you moved 5 files.
if !noOfMovedFiles! EQU 5 GOTO endOfCopy
echo Done, Copied %noOfMovedFiles% files!
Open in new window
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.