By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

DOS CMD Sort+Add Sequence+Remove Sequence number


I want to edit a folder with 3500 .wma music files(records). Can someone please give me the exact DOS CMD Commands to -
a) Sort the folder alphabetically
b) Add a Sequence number in front of each music record's filename
(at this point I want to edit the folder's records - remove, repair and load back the one's with problems)
c) Remove the Sequence numbers

Thank-you very much

What operating system? ... what file system (NTFS?) ... are all the files in **one** directory (without subdirectories)? ... what will the numbers be used for?
Hi vefatica

Thanks for responding. I am using Windows 10 Pro, NFTS filing system, and there are masses of sub-directories, which I am busy to remove - cut & pasting all records to a single directory. Eventually I would break them up in Classical; Light Classical; Opera; Vocal; Popular; etc (maybe 10 to 20 sub-directories), after I have fixed the problems.

As I mentioned in a previous thread (May 2017), for some or other reason some of the .wma records don't play on the music system of my Honda Civic ("Not Playable"), so I need to easily identify the culprits, because it just flashes on the display screen, then it goes on to the next record. If every record is numbered, it would be easy to jot down the culprits.


If the DOS CMD Command to remove the sequence numbers can also be used to remove all digits in the front of all filenames it will be great, because at the moment I have to remove it manually (inserted as track numbers when loading LP's to my computer by MAGIX app). The few valid digits like "1812 Overture" I can reload manually.
I have no idea how (or even IF) what you want can be done with CMD. Here are a couple straightforward BTM files (for TCC.EXE) to add and remove the numbers (and an example of their use). I'd be very surprised to see something like that done with CMD. Sorting should not be an issue if you have NTFS; NTFS returns filenames in alphabetical order.
Thank-you vefatica, MaartenG and JohnQSmith. I'm not too smart on software, so it will take me a time to experiment to get a workable solution.
Will let you know when there is a positive result.
wren.exe does a pretty good job on this. It comes in MS-DOS and Win32 modes.

In the example above, you would use ' wren *-*.wma $3.wma' The $1, $2, ... match individual wildcards or strings.

WRen by Jason Hood <[email protected]>.
Version 1.02 (9 October, 2003). Freeware.

WREN [-acdFt] [old_path]old_pattern [[new_path]new_pattern]

        -a      all files (include hidden and system files)
        -c      match case
        -d      include directories
        -F      force rename (delete existing files)
        -t      test (display instead of rename)
        -u      undo the previous rename
        -h      help

Similar threads