Each folder either consists of files or 2 or more sub folders. If there are sub folders it is these that will contain files.
The files in the folders will be a mix of formats but will always contain MP3 files
These MP3 files will be named in one of two ways. I need to be able to identify the name of the folder that contains files that are named in a specific way. Initially I believed that the files I needed to identify always had the folder name as part of the file name and so this was my code:
Currently I have a version working as follows:
Code: Select all
Let>INPUT_BROWSE=2
Input>folder_result,Please Select The Root Folder,
IF>folder_result=
Exit>0
EndIF
Let>GFL_TYPE=1
Let>GFL_SORTTYPE=3
GetFileList>%folder_result%\*.*,folders
Separate>folders,;,folder_names
Let>k=0
Label>Start
Repeat>k
Let>k=k+1
ExtractFileName>folder_names_%k%,name_folder
Wait>0.2
ChangeDirectory>%folder_result%\%name_folder%\
CountFiles>%name_folder%*.mp3,nCount,0
If>nCount>0
PutClipBoard>%name_folder%
Wait>0.2
SetFocus>renamed_titles.txt - Notepad
Wait>0.2
Press>Ctrl
Send>v
Release>Ctrl
Press>Enter
Press>Ctrl
Send>s
Release>Ctrl
EndIf
GoTo>Start
Until>k=folder_names_count
6 digits_0_4digitsa_Text
e.g
024002_0_0001a_RipTide
The value of the 6 digits will be different in each folder but will be the same for all MP3 files within a folder. The 4 digit number will start at 0001 and will increment by 1 for each MP3 file and is always followed by the letter a. The text at the end will be different in each folder. Overall the file name length will vary from folder to folder but that will be defined by the length to the Text at the end the 6digits_0_4digitsa_ is always the same.
I'm currently trying to work out how I can make the code check for that 6digit_0_4digita_ file name but I don't really know where to begin. I also eventually need it to check for subfolders but that can wait until I've solved this first issue.