Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

move a fixed number of files between two directories

2 views
Skip to first unread message

Tyrser

unread,
Jul 2, 2008, 6:10:51 AM7/2/08
to
Hi all.

I'd like to create a batch file that moves X files from a directory to
another where x is a number;-)
I have a directory with 100000 files and i'd like my script to move 100
files to another dir each time the batch is run.
The goal is to schedule this process so the batch moves e.g. 100 files every
5 minutes untill the source dir is empty.

Any Idea?

Thanks all!


foxidrive

unread,
Jul 2, 2008, 8:02:22 AM7/2/08
to

For which OS?

Do you want to run a process on the 100 files at a time?

Richard Bonner

unread,
Jul 2, 2008, 12:14:06 PM7/2/08
to

*** Here's an XSET solution:

:: 100.bat
:: Moves 100 Files
::
@ECHO OFF

SET LOOP=0

:LOOP
DIR /OD /B | XSET /LINE 1 FILE
MOVE %FILE% whereever

C:\DOS\XSET /MATH LOOP=%LOOP% +1
IF NOT "%LOOP%" == "100" GOTO LOOP

SET LOOP=
SET FILE=


One or more links to XSET can be found at:

http://www.chebucto.ca/~ak621/DOS/Websites.html


Richard Bonner
http://www.chebucto.ca/~ak621/DOS/

0 new messages