I thought this would be simple, but the harder I look the more it appears to be pretty difficult.
I want to add the current line number in the file to the text of each line and move some text around. I'm trying to add a file number to music tracks to control play.
I want to convert a file like this:
#EXTINF:309,The Who - Baba O'Riley
\My Music\Who\Baba O'Riley.mp3
#EXTINF:246,Who - I Can See For Miles
\My Music\Who\I Can See For Miles.mp3
#EXTINF:199,The Who - My Generation
\My Music\Who\Greatest Hits\04 - My Generation.mp3
#EXTINF:183,The Who - Pinball Wizard
\My Music\Who\Greatest Hits\05 - Pinball Wizard.mp3
To a file like this:
Copy "S:\My Music\Who\Baba O'Riley.mp3" "S:\TempCopy\001 Baba O'Riley.mp3"
Copy "S:\My Music\Who\I Can See For Miles.mp3" "S:\TempCopy\002 I Can See For Miles.mp3"
Copy "S:\My Music\Who\Greatest Hits\04 - My Generation.mp3" "S:\TempCopy\003 04 - My Generation.mp3"
Copy "S:\My Music\Who\Greatest Hits\05 - Pinball Wizard.mp3" S:\TempCopy\004 05 - Pinball Wizard.mp3"
Where 001-004 are the line number of each line in the file.
I have gotten this far with this macro:
Find "\My Music\"
Replace All "Copy "S:\My Music\"
Replace All ".mp3" S:\TempCopy"
This Macro gives me this output:
Copy "S:\My Music\Who\Baba O'Riley.mp3" S:\TempCopy
Copy "S:\My Music\Who\I Can See For Miles.mp3" S:\TempCopy
Copy "S:\My Music\Who\Greatest Hits\04 - My Generation.mp3" S:\TempCopy
Copy "S:\My Music\Who\Greatest Hits\05 - Pinball Wizard.mp3" S:\TempCopy
The 2 remaining things I'm struggling with is how to pickup and copy just filename (not path) and how to add the line number (with leading zero padding).
I'm tempted to just write an app in C# to do it, but I like the idea of using a UE macro.
I'm amazed at how complex some of the macros you guys put together are. So I thought maybe one of you could pull this one off.
Thanks so much in advance!