1
How would you write a script (preferably for the Windows commandline) that:
- Examines thousands of MP3 files stored on a single drive (e.g.,
G:\
) - Randomizes the collection
- Populates a series of directories up to 650MB worth of songs (without exceeding 650MB)
- Every song is shucked exactly once
- (Optional) The directory size comes as close as possible to 650MB
The DIR
, COPY
, and XCOPY
commands have no explicit file size switches.
A few Google searches have come up with:
- File size condition in DOS
- Cygwin and UWIN
- DOS File sizes
It would be ideal if UNIX-like environments can be avoided.
My question, then: How do you compare file (or directory) sizes using the Windows commandline?
4Why do you need it to leverage DOS? – None – 2010-02-09T17:45:48.600
Windows XP Pro is the environment. DOS is not necessary if there is a Windows tool that can do the same task. Also, would this be a better question for serverfault? – Dave Jarvis – 2010-02-09T18:02:59.943
2WinXP Pro does not even have DOS on it – Joe Phillips – 2010-02-09T18:33:53.327
1I guess by saying DOS Dave means Windows command interpreter (cmd). – Helen – 2010-02-09T18:46:33.857
@d03boy: when people say "DOS" these days, they're normally referring to the Windows non-graphical command shell. It's just easier. – Michael Petrotta – 2010-02-09T18:47:30.043
I'm old school. ;-) – Dave Jarvis – 2010-02-09T18:55:35.157
I am told iTunes will do this. – Dave Jarvis – 2010-02-09T19:00:46.443
1I know what he meant but I figured I'd bring that up anyway since this is a learning site and there should be correct information here – Joe Phillips – 2010-02-09T20:23:09.523