You are not logged in.
Pages: 1
Hello
How can I make two files that have the same name but difference file extension. For example
Track1.mp3
Track1.cdg
Track2.mp3
Track2.cdg
etc
I have imported a file that contains the track list, for example
SF250 - 01 - CHRISTMAS MY ARSE - RICKY TOMLINSON
SF250 - 02 - YOU KNOW MY NAME - CHRIS CORNELL
However I need them to be applied to both mp3 and cdg but at the moment it looks like this
Track1.mp3 >> SF250 - 01 - CHRISTMAS MY ARSE - RICKY TOMLINSON
Track1.cdg >> SF250 - 02 - YOU KNOW MY NAME - CHRIS CORNELL
It should look like
Track1.mp3 >> SF250 - 01 - CHRISTMAS MY ARSE - RICKY TOMLINSON.mp3
Track1.cdg >> SF250 - 01 - CHRISTMAS MY ARSE - RICKY TOMLINSON.cdg
Track2.mp3 >> SF250 - 02 - YOU KNOW MY NAME - CHRIS CORNELL.mp3
Track2.cdg >> SF250 - 02 - YOU KNOW MY NAME - CHRIS CORNELL.cdg
I have no knowledge of Pascal so if anyone could help. It has take over 6 hours just to find the program which I very happy with (THANKS)
This is the code I am using at the moment (Which I know it wrong)
var
I: Integer;
begin
I := I + 1;
FileName := FileReadLine('C:\SUNFLY.CSV', I);
end.
Thanks
Rob
Offline
If there are always 2 files with the same name (but different extension), there is an easy solution:
const
NAMES = 'C:\SUNFLY.CSV';
var
I: Integer;
Ext: WideString;
begin
I := I + 1;
Ext := WideExtractFileExt(FileName);
FileName := FileReadLine(NAMES, (I+1) div 2) + Ext;
end.
Here is a screenshot:
Also, there is a more complicated solution described in several threads, which you probably don't even need, but you could have a look just for your information: Help numbering files
Offline
Thanks for that, I have one more problem.
Is there any way of missing the first line of the text file as my file list have the following
MF CODE,TRACK,SONG,ARTIST
The above works really well but I just need to miss the top line.
Rob
Offline
Here you go:
const
NAMES = 'C:\SUNFLY.CSV';
var
I, Line: Integer;
Ext: WideString;
begin
I := I + 1;
Line := ((I+1) div 2) + 1;
Ext := WideExtractFileExt(FileName);
FileName := FileReadLine(NAMES, Line) + Ext;
end.
Offline
Thanks that works really well,
Last question about formating
My csv file looks like this
MF CODE,TRACK,SONG,ARTIST
SF250,01,CHRISTMAS MY ARSE,RICKY TOMLINSON
SF250,02,YOU KNOW MY NAME,CHRIS CORNELL
At the moment I use another rule to remove and replace the , with - but it now looks like
SF250 - 01 - CHRISTMAS MY ARSE - RICKY TOMLINSON.cdg
SF250 - 01 - CHRISTMAS MY ARSE - RICKY TOMLINSON.mp3
SF250 - 02 - YOU KNOW MY NAME - CHRIS CORNELL.cdg
SF250 - 02 - YOU KNOW MY NAME - CHRIS CORNELL.mp3
Is there a way of formating them to look like
SF250 - 01 CHRISTMAS MY ARSE - RICKY TOMLINSON.cdg
SF250 - 01 CHRISTMAS MY ARSE - RICKY TOMLINSON.mp3
SF250 - 02 YOU KNOW MY NAME - CHRIS CORNELL.cdg
SF250 - 02 YOU KNOW MY NAME - CHRIS CORNELL.mp3
If it a lot of work do not worry as this will do. This program is really good.
Rob
Offline
It looks like you want to remove all of the second dashes, right?
Use RegEx rule, with these parameters:
Expression: \A(.+?-.+?) -
Replace: $1
It might look strange, but it will actually convert:
SF250 - 01 - CHRISTMAS MY ARSE - RICKY TOMLINSON.mp3
into
SF250 - 01 CHRISTMAS MY ARSE - RICKY TOMLINSON.mp3
Offline
Thanks for that. This is a really good program.
Rob
Offline
Pages: 1