Couple folder creation questions

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.:laughing:

dammit :neutral_face: i just had the path wrong, i had to change

DOpusRTPath = "C:\Program Files\Directory Opus\dopusrt.exe"

to

DOpusRTPath = "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe"

now it works :bulb:

i guess i really am a monkey :neutral_face:

it's written few posts before!

[quote="der_affe"]

-is there a way to create a folder named from the parent folder?

help!

much thanks! tussen takk! vielen dank :smiley:[/quote]

I figured out how to create a folder named from parent folder- anyone who wants to try it, paste this into an advanced button:

CreateFolder "New Folder"
Rename "New Folder" TO="{parent}.{ext}" FILEINFO

does it work for anyone? :smiley:

You need to understand what you do...

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 ?

AlbatorV, thanks for your time!

look i have a question, it relates back to this post you made Rename parent folder from selected file metadata

you wanted to rename the parent folder based on the audio tags. well, i want to just create a folder, based on audio tags...

i try this code:

CreateFolder "New Folder"
Select *.mp3
@dirsonly
Rename FILEINFO TO "{mp3artist} - {mp3album} - Album Art"

but it's creating a folder that looks like this- it's as though it's trying to do it, but it can't get the tag information to name the folder with:

any thoughts are appreciated, getting this right would save me alot of time, as i have alot of audio to sort out.

maybe, Rename FILEINFO doesnt work for folders? if thats true, would there be a corresponding command for folders?

thanks! :question: :blush: :question:

FILEINFO works for folders but in your command you want to rename folder based on mp3 fileinfo.
Forders are not mp3, so it's not possible like that.

You need to use vbscript to catch mp3 infos and create folder with these infos.

i was afraid you would say that :neutral_face:

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)

strCommand = """" & DOpusRTPath & """ /cmd Rename {filepath$|..|noterm} TO=""" & artist & " - " & album & " (" & annee & ")"""

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 :confused:

help oh gurus!!

@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 :laughing: 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.

i made a button with the new operations:

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:

Select *(.txt|.cue|.jpg|.log)
Copy MOVE HERE= "*Album Art"

i know the above isnt right, but its the way im thinking it would work, can anyone help out? this will finish up what im working on :slight_smile:

again thanks to kundal & albatorV you guys have been a great help :open_mouth:

  1. Select your destination folder
  2. use this button

@set dest={filepath} Select NONE Select *.(txt|cue|jpg|log) Copy MOVE TO={$dest}

CreateFolder "Rip Logs"
Select "Rip Logs"
@set dest={filepath}
Select NONE
Select *.(txt|cue|log|m3u|md5)
Copy MOVE TO={$dest}
:smiley: :smiley:

anyway to set a relative folder path?

kundal, when you get some time could you pm me, i got one little problem with the script, unless you'd rather i posted it here?

thanks

How about shortening it to a one-liner:

Copy MOVE FILE *.(txt|cue|log|m3u|md5) CREATEFOLDER "Rip Logs" HERE

:smiley:

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.

kundal, i'll go ahead and post it here-

i'm using this script you gave me to rename parent folder from tags:

strCommand = """" & DOpusRTPath & """ /cmd Rename {filepath$|..|noterm} TO= """ & artist & " - " & album & " - " & "(" & annee & ") " & "(" & "mp3 " & bitrate & ")"""
Shell.Run strCommand,0,false

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!! :grin:

@steje - thanks for your help as well, done and implemented

Post the full script if you need help... and not PM...

Question : do you understand how the script works ? Because display "mp3" or "flac", it's the same way.

ok-- i use this script to rename parent folder from tags:

@filesonly
Select *(.mp3|.flac|.ape|.ogg|.mpc)
Rename FILEINFO TO="{mp3artist}{mp3album}{mp3year}{mp3bitrate}"
@script vbscript
Option Explicit
dim DOpusRTPath
DOpusRTPath = "C:\Program Files\GPSoftware\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 Rename {filepath$|..|noterm} TO= """ & artist & " - " & album & " - " & "(" & annee & ") " & "(" & "mp3 " & bitrate & ")"""
Shell.Run strCommand,0,false
End if
End Function

and when i use it, it always includes "mp3" in the name, regardless of what type the source audio files are-- see screen:

i was thinking there might be an %codec% or %extension% switch so that the folder names will properly reflect the filetypes :smiley:

anyone, have thoughts? besides the idea that i have lost it...

@filesonly Select *(.mp3|.flac|.ape|.ogg|.mpc) Rename FILEINFO TO="{mp3artist}_{mp3album}_{mp3year}_{mp3bitrate}_{ext}" @script vbscript Option Explicit Dim DOpusRTPath, Shell, fFirst DOpusRTPath = "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" Set Shell = CreateObject("WScript.Shell") fFirst = TRUE Function Rename_GetNewName(strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName) Dim strCommand, strInfoArray, artist, album, yyear, bitrate, extension strInfoArray = split(strNewName, "_") strNewName = "" If fFirst Then fFirst = FALSE artist = strInfoArray(0) album = strInfoArray(1) yyear = strInfoArray(2) bitrate = strInfoArray(3) extension = strInfoArray(4) strCommand = """" & DOpusRTPath & """ /cmd Rename {filepath$|..|noterm} TO=""" & artist & " - " & album & " - " & "(" & yyear & ") (" & extension & " " & bitrate & ")""" Dopus.OutputString "Commande : " & strCommand Shell.Run strCommand,0,false End if End Function