How can I get command prompt to merge my files in name order?
Posted
by
Anastasia
on Super User
See other posts from Super User
or by Anastasia
Published on 2011-02-23T17:27:01Z
Indexed on
2012/04/06
23:34 UTC
Read the original article
Hit count: 182
I'm using the copy command in command prompt to merge all the files in a directory, for a number of directories.
The problem is, I need to edit the first file in each directory before I merge. This means that when I put in the command "copy /b *.mp3 name.mp3", the joined file has part 2 at the start and part 1 at the end, presumably because it was created last.
Is there a way of using the copy command so that the files merge in name order? Each folder has a different number of parts, anywhere from 2 to 1000 so I don't want to list each file with a "+" in between.
Ideally, I'd like to find something to insert into the copy command I'm already using. Otherwise, is there a way of rearranging the files in a folder so that if you enter "DIR", part 1 shows up first even if it was edited last?
I'm using Windows 7 by the way.
© Super User or respective owner