Moving 20,000 files 100 at a time? (Win / Dos)
#1
I have a Win 98 machine here with 20,000 emails as text files in a directory.
I need to move them into a users mailbox 100 or so at a time as the mail server can't handle the whole lot and crashes.
Windows locks when you try and open the directory.
I think a DOS batch file is the best way but I can't find away to only move a set number of files, not the whole lot.
Any ideas?
Thanks!
I need to move them into a users mailbox 100 or so at a time as the mail server can't handle the whole lot and crashes.
Windows locks when you try and open the directory.
I think a DOS batch file is the best way but I can't find away to only move a set number of files, not the whole lot.
Any ideas?
Thanks!
#2
I'm sure I did something very similar some time ago, can't find the file at the moment, may be on a system at home.
IIRC I used "dir /b > filename" to get a listing of the basic file names then used "for /F" to process that file line by line. "for /f" lets you specify number of lines to skip at start of file.
I find http://www.ss64.com/nt/index.html useful as a command reference (It's NT specific but most work on earlier versions and they often have notes re differences.)
IIRC I used "dir /b > filename" to get a listing of the basic file names then used "for /F" to process that file line by line. "for /f" lets you specify number of lines to skip at start of file.
I find http://www.ss64.com/nt/index.html useful as a command reference (It's NT specific but most work on earlier versions and they often have notes re differences.)
Thread
Thread Starter
Forum
Replies
Last Post
Scott@ScoobySpares
Full Cars Breaking For Spares
61
11 January 2021 03:08 PM
BlueBlobZA
Member's Gallery
30
25 July 2016 09:14 AM
Scott@ScoobySpares
Full Cars Breaking For Spares
7
14 December 2015 08:16 AM
Mattybr5@MB Developments
Full Cars Breaking For Spares
20
22 October 2015 06:12 AM