batch file copy size limit

April 24, 2010 at 05:49:28
Specs: Windows 7
Comment: Hi, I found this interesting command line here to do a backup, but I need some change. I would need to copy files larger than 3k and smaller than 20mb, is there anyway to do this? :
@Echo Off
PushD "C:\users\%username%\My Documents"
For /R "%CD%" %%J in (*.*) Do (
If %%~zJ leq 20000000 Copy "%%J" f:\backup\)


See More: batch file copy size limit

Report •

April 24, 2010 at 08:23:33
@echo off & setLocal EnableDELAYedeXpansion

for /f "tokens=* delims= " %%a in ('dir/b/s/a-d') do (
if %%~Za gtr 3000 if %%~Za lss 20000000 echo copy %%a d:\bak

Helping others achieve escape felicity


Report •
Related Solutions

Ask Question