The Button is fully working for me. Did you read all my previous posts carefully? If you followed everything I can't imagine what's going wrong. It's time for me to sleep now. Perhaps leo (or another guy) reads this tomorrow and can help.
Apes are very social animals. If you got a cootie you'll always find another ape here helping you to get rid of it.
Apes are also very smart in finding the most delicious fruits in the jungle (of DOpus...). I'm sure you'll find the fruits you need if you learn how to find them from the more experienced grey-backed orang-utans here.
Your 1st lign create folder "New folder" in current folder, then your 2nd try to rename folder in your new folder named "New Folder". But "New folder" doesn't exist.
Then {ext} is for extension. Folders have extensions ? So you don't need to use that. So...
CreateFolder "New folder" READAUTO=no
Rename "New folder" TO="{parent}" FILEINFO
READAUTO=no -> not enter new folder
But if you want to enter new folder...
CreateFolder "New folder"
Rename {sourcepath} TO="{parent}" FILEINFO
And for your PM message (Add codec to folder name), you want the codec name ?
looking at your script from the other post where you were trying to rename parent folder from audio tags, i noticed this was the important part (i think)
maybe the /cmd Rename {filepath$|..|noterm} could be changed to create a folder, instead of renaming parent? i have no idea about scripting so im trying to be derivative, but to keep guessing could take me ages
@nodeselect
Rename FILEINFO TO="{mp3artist}_{mp3album}_{mp3year}"
@script vbscript
Option Explicit
dim DOpusRTPath
DOpusRTPath = "C:\Program Files\Directory Opus\dopusrt.exe"
Dim Shell
Set Shell = CreateObject("WScript.Shell")
Dim fFirst
fFirst = TRUE
Function Rename_GetNewName(strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName)
Dim strCommand
Dim artist
Dim strInfoArray
Dim album
Dim annee
strInfoArray = split(strNewName, "_")
strNewName = ""
If fFirst Then
fFirst = FALSE
artist = strInfoArray(0)
album = strInfoArray(1)
annee = strInfoArray(2)
strCommand = """" & DOpusRTPath & """ /cmd CreateFolder """ & artist & " - " & album & " - " & "Album Art" & ""
Shell.Run strCommand,0,false
End if
End Function
Perhaps you'll also like this variation:
Create Folder: "Artist - Album - (Year) (mp3 bitrate)
@nodeselect
Rename FILEINFO TO="{mp3artist}_{mp3album}_{mp3year}_{mp3bitrate}"
@script vbscript
Option Explicit
dim DOpusRTPath
DOpusRTPath = "C:\Program Files\Directory Opus\dopusrt.exe"
Dim Shell
Set Shell = CreateObject("WScript.Shell")
Dim fFirst
fFirst = TRUE
Function Rename_GetNewName(strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName)
Dim strCommand
Dim artist
Dim strInfoArray
Dim album
Dim annee
Dim bitrate
strInfoArray = split(strNewName, "_")
strNewName = ""
If fFirst Then
fFirst = FALSE
artist = strInfoArray(0)
album = strInfoArray(1)
annee = strInfoArray(2)
bitrate = strInfoArray(3)
strCommand = """" & DOpusRTPath & """ /cmd CreateFolder """ & artist & " - " & album & " - " & "(" & annee & ") " & "(" & "mp3 " & bitrate & ")"""
Shell.Run strCommand,0,false
End if
End Function
Astounding, it's working properly things i used to have to type manually over and over again, i can now reproduce with one click!
thanks very much to all of you guys who have helped me! alot of work has gone into those scripts i know, and i appreciate everyone sharing their knowledge.
and if i could, could i ask one last final question that relates somewhat to this?
all the files in the screenshot above that are not music files- the .jpg, .txt file etc. - how could i select them all and move them into the folder named "album art" with a button? the folder's name would be variable, but will always contain "album art"
i figure the command would be something like this:
Copy MOVE FILE *.(txt|cue|log|m3u|md5) CREATEFOLDER "Rip Logs" HERE
Side Note: sometimes, using 'Select' commands in multi-command buttons doesn't work as well as you'd expect... a "timing issue" sometimes perhaps. You'd probably never come across an issue with that given this particular use-case, but at any rate... this one-liner is just simpler and less to 'potentially' go wrong.
it works great, but i have one small problem with it: if the audio files arent mp3, if theyre flac for example, it still names the parent folder "mp3 ~592 kbps" is there a switch i could use instead, maybe %codec% or %extension%, so that filetype would always show properly?
thanks so much!!
@steje - thanks for your help as well, done and implemented