Computing.Net > Forums > Programming > Mkdri & Move

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Mkdri & Move

Reply to Message Icon

Name: Okodugba
Date: July 6, 2009 at 11:54:36 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

Hi,
I need to write a batch script that will take 36,000 files and break them up into 6 folders with 6000 files in each. Any help would be appreciated.



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: July 6, 2009 at 13:20:44 Pacific
Reply:

If you're not fussy about which go where:

=============================
@echo off > newfile & setLocal enableDELAYedexpansion

for %%m in (a b c d e f) do md %%m

set N=
for /f "tokens=* delims= " %%a in ('dir/b/a-d') do (
set /a N+=1
if !N! leq 6000 move %%a a
if !N! gtr 6000 if !N! leq 12000 move %%a b
)

and so on


=====================================
If at first you don't succeed, you're about average.

M2


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Mkdri & Move

batchfile move from briefcase help! www.computing.net/answers/programming/batchfile-move-from-briefcase-help/10820.html

Moving a IDB_BITMAP www.computing.net/answers/programming/moving-a-idbbitmap/5338.html

Batch to move file by sysdate www.computing.net/answers/programming/batch-to-move-file-by-sysdate/14939.html