DOS batch to move files of certain size

Microsoft Upg-vc msdos 6.22
October 26, 2009 at 09:29:08
Specs: Windows XP
I'm new to DOS batch files but help to do the following:

find any files under a certain size in a directory and move them to another directory..


See More: DOS batch to move files of certain size

Report •


#1
October 26, 2009 at 11:42:17
@echo off
setlocal
set /p directory=Directory where the files are: 
set /p size=Critical size in bytes: 
set /p newdirectory=Where to put the smaller files: 
for %%f in ("%directory%\*") do if %%~zf lss %size% move "%%f" "%newdirectory%\"


Report •
Related Solutions


Ask Question