Hi guys,
I have a relatively easy one that's been bugging me for a while!
If i have the following files in the following pathname and folder: "C:\music\Jazz\Jazz Classics Vol1 Disc1\"
-------------------------------
Jazz classics vol1 Disc 1.ape
Jazz Classics vol1 Disc 2.ape
Cuesheet1.cue
Cuesheet2.cue
-------------------------------
I'd like to do the following with them:
1) use the filename of EACH ape file (minus the extension) as a findstr to see if it exists in
ANY of the cuefiles in the same folder.
2) If findstr command finds a match in the cuesheet I need it to create a folder based on the
.ape filename that it found the match in and move the .ape file and the corresponding .cue file to that folder.
3) I need it to loop through the whole low level folder and do this with every ape file in the folder c:\music
Anyone?
Looping through Matching strings to complete actions...
Moderator: DosItHelp
-
- Posts: 38
- Joined: 04 Apr 2012 03:11
-
- Posts: 38
- Joined: 04 Apr 2012 03:11
Re: Looping through Matching strings to complete actions...
Still struggling with this anyone got any leads what would be a good way to tackle it?
Re: Looping through Matching strings to complete actions...
phoenix_Rising wrote:Hi guys,
I have a relatively easy one that's been bugging me for a while!
If i have the following files in the following pathname and folder: "C:\music\Jazz\Jazz Classics Vol1 Disc1\"
-------------------------------
Jazz classics vol1 Disc 1.ape
Jazz Classics vol1 Disc 2.ape
Cuesheet1.cue
Cuesheet2.cue
-------------------------------
I'd like to do the following with them:
1) use the filename of EACH ape file (minus the extension) as a findstr to see if it exists in
ANY of the cuefiles in the same folder.
2) If findstr command finds a match in the cuesheet I need it to create a folder based on the
.ape filename that it found the match in and move the .ape file and the corresponding .cue file to that folder.
3) I need it to loop through the whole low level folder and do this with every ape file in the folder c:\music
Anyone?
I guess I am confused because based on his description wouldn't he end up with the following structure:
C:\music\Jazz\Jazz Classics Vol1 Disc1\Jazz classics vol1 Disc 1\Jazz classics vol1 Disc 1.ape
C:\music\Jazz\Jazz Classics Vol1 Disc1\Jazz classics vol1 Disc 1\Cuesheet1.cue
C:\music\Jazz\Jazz Classics Vol1 Disc1\Jazz classics vol1 Disc 2\Jazz classics vol1 Disc 2.ape
C:\music\Jazz\Jazz Classics Vol1 Disc1\Jazz classics vol1 Disc 2\Cuesheet2.cue
Re: Looping through Matching strings to complete actions...
Squashman wrote:I guess I am confused because based on his description wouldn't he end up with the following structure:
C:\music\Jazz\Jazz Classics Vol1 Disc1\Jazz classics vol1 Disc 1\Jazz classics vol1 Disc 1.ape
C:\music\Jazz\Jazz Classics Vol1 Disc1\Jazz classics vol1 Disc 1\Cuesheet1.cue
C:\music\Jazz\Jazz Classics Vol1 Disc1\Jazz classics vol1 Disc 2\Jazz classics vol1 Disc 2.ape
C:\music\Jazz\Jazz Classics Vol1 Disc1\Jazz classics vol1 Disc 2\Cuesheet2.cue
Yes, I thought that too.
Maybe he meant the .cue files have the same filename as the .ape ones? And this example was just to, well, illustrate the situation?
Phoenix_rising?
Re: Looping through Matching strings to complete actions...
phoenix_Rising wrote:If i have the following files in the following pathname and folder: "C:\music\Jazz\Jazz Classics Vol1 Disc1\"
-------------------------------
Jazz classics vol1 Disc 1.ape
Jazz Classics vol1 Disc 2.ape
Cuesheet1.cue
Cuesheet2.cue
-------------------------------
I'd like to do the following with them:
1) use the filename of EACH ape file (minus the extension) as a findstr to see if it exists in
ANY of the cuefiles in the same folder.
2) If findstr command finds a match in the cuesheet I need it to create a folder based on the
.ape filename that it found the match in and move the .ape file and the corresponding .cue file to that folder.
3) I need it to loop through the whole low level folder and do this with every ape file in the folder c:\music
Can cuesheet1.cue or Cuesheet2.cue have both "Jazz Classics vol1 Disc 2.ape" and "Jazz Classics vol1 Disc 2.ape" inside them?
The cue/ape files will be moved with the first match and so can't be compared for the second and subsequent .ape files.