![]() |
| No items matching your keywords were found. |
Remove path string and replace string using a batch file?
I have a text file that lists hundreds of filenames from various subfolders.
Example string from mylist.txt
H:STILL RENAMINGDONE(J's) The Sunfly Karaoke Collection Cdg (11 Of 26)If Loving You Is Wrong - James Ingram & Luther Vandross - Sunfly J.cdg
H:STILL RENAMINGDONECYoung Hearts Run Free - Candi Staton - C.cdg
The batch file should be able to:
1.) remove the pathname
2.) " - " replaced with a tab keystroke like this ""
3.) ".cdg" replaced like this "cdg" ( note that it also has a tab keystroke )
Once finished, it should look like these:
If Loving You Is WrongJames Ingram & Luther VandrossSunfly Jcdg
Young Hearts Run FreeCandi StatonCcdg
The purpose of this is that once mylist.txt is proccessed by the batch file, I can copy and paste the text into Excel. The tab keystroke will be excel's "hint" to divide the text into cells. Is this even possible with a batch file? Alternate solutions welcome too
Thanks in advance!
First you have to import your txt file into excel then use this add-in StrRight.xla which can be download at http://www.freewebs.com/swhtam/YA/StrRight.xla
After download the xla file above, Go to menu tools, add-ins, browse and locate StrRight.xla, click ok button
GENERAL FORMAT: STRRIGHT( value As String, delimiter As String, occurence As Integer)
USAGE:
say in A1 you got, http://yahoo.com/question/abc/123
= STRRIGHT( A1, "/", 1) then you got 123
= STRRIGHT( A1, "/", 3) then you got question/abc/123
= STRRIGHT( A1, "", 7) then you got abc/123
To make a complete formula that produce the final result
=SUBSTITUTE( SUBSTITUTE( STRRIGHT( A1, "/", 1), " -",""), ".cdg"," cdg")
Hope this helps.
jimmy eat world hear you me acoustic female vocal instrumental myspace lizmusic james wasil karaoke cdg mp3g lyrics2part
