Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Need help deciding to delete or exclude certain file size before move  (Read 2933 times)

0 Members and 1 Guest are viewing this topic.

batch boy

  • Guest
Here's a batch I managed to make that works, but I'm trying to refine it to not copy over files greater than 30kb. Is it easier to delete files 30kb and below before it executes the move command? Or  to just exclude files 30kb and below from moving to the target directory? I googled set limit but was a little over my head as I'm still a neophyte, so I thought the delete would be easier.
 
Code: [Select]

@FOR /R "C:\Documents and Settings\%username%\Program Files\Stair Docs VOB Files\" %%G IN (*.vob) DO del "%%G"


@md "C:\Documents and Settings\%username%\Desktop\trash"

@FOR /R "C:\Documents and Settings\%username%\Program Files\Stair Docs VOB Files\" %%G IN (*.*) DO move /y "%%G" "C:\Documents and Settings\%username%\Desktop\trash"

After I figure out which route to take, I'll just keep modifying it to exclude certain file extensions from being moved as well.






Thanks for any input


edit0000 I refined it a little to target extensions. I'll keep researching how to delete multiple files of a certain size and below.
« Last Edit: February 27, 2009, 12:08:55 PM by batch boy »