How 2 - Loop directory get filename, then find pos of @ char

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
ibexcentral
Posts: 2
Joined: 18 Jan 2009 05:56

How 2 - Loop directory get filename, then find pos of @ char

#1 Post by ibexcentral » 18 Jan 2009 06:10

Hi,

I would really appreciate it if someone could help provide the dos code to:

1. Loop through a directory pick out only .mp4 files
2. And for every .mp4 get filename and remove extension
3. Split the filename string and place into variables from this format:

B_200901011555_VIDEO_CATEGORY@Title Of The Video.mp4

to this:

Date=2009010111555
Category=VIDEO_CATEGORY
Title=Title Of The Video

4. Still on a file by file basis, I guess in a for loop, construct the following string which calls a command line program called AtomicParsley (Which adds metadata to an .mp4 file) the string would be as follows based on the filename above:

AtomicParsley "B_200901011555_VIDEO_CATEGORY@Title Of The Video.mp4" --purchaseDate "2009010111555" --keyw "VIDEO_CATEGORY" --title "Title Of The Video" --overWrite

5. Continue to loop through the rest of the .mp4 files in a directory and perform the same string manipulation and then call the AtomicParsley program to add the metadata.

I have had a go but failed as I don't know the dos commands to split the string up properly.

Please help.

Thanks

Post Reply