Couple folder creation questions

when creating folders,

-is there a way to set a button to create a folder that always includes the same text? i figured out how to create a folder named from a selected file by using CreateFolder {file|noext} if i could figure out how to get it to always include - work folder that would be useful to me as i'm always typing work folder manually.

-is there a way to create a folder named from the parent folder? i figured out how to rename a file from parent by using Rename TO="{parent}.{ext}" FILEINFO i tried playing around with it, but couldnt figure out how to create a folder the same way.

  • and the dreaded question.. anyone know of a way to create/name a folder based on audio tags??


much thanks! tussen takk! vielen dank :smiley:


@filesonly @firstfileonly CREATEFOLDER NAME="{file|noext}-work folder"

2) I couldn't find a Button for this in my own collection. You should search the "Rename Scripting" Section for this.
I think it will need (like the next one) this technique: [url][OBSOLETE] "Abusing" Rename Scripts to do other things with file info]

3) Rename Folder to "Artist - Album - (Year)"

@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 Rename {filepath$|..|noterm} TO=""" & artist & " - " & album & " (" & annee & ")""" Shell.Run strCommand,0,false End if End Function

This one creates an empty folder with the same name inside selected folders. Maybe it's good enough for you:

@dirsonly CreateFolder "{filepath}\{file}" @NODESELECT

kundal, thank you for the help- just saw your post, and i'm about to begin experimenting hehe.. i'll probably have a few questions later if that's ok :wink:

kundal, kurze frage fur dich- for the renaming folder from tag, do i need a script of some sort installed? the button doesnt seem to do anything

I sometimes had the issue that copying scripts from the forum out of a "code"-box didn't work because there are spaces at the beginning of each line. Try to delete them. It should work then.
It seems you're german. You could also open a thread in the german forum. I'll notice it there. For me it's much easier to answer in german.

For the creating/naming a folder by audio tag... What is it that you want to do exactly? Folders don't have audio tags - right, so I presume you're wanting to select an audio file, use audio tag data to create a folder - then what? For example - are you going to move the files into the new folder or something? Can you describe what you want to happen - or is it really just create a folder and that's it...?

Do you have edited the install path in script ?

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

Original post here : Rename parent folder from selected file metadata

Hi AlbatorV,
Thanks for mentioning this (and the original post) here. I didn't really notice the non-standard installation path in your Button because it's the same for me.
The issue with the Spaces added to the code when copying it out of the "CODE"-Box seems to only happen if you're using Firefox 4.0 or 3.6. I reported this in the "Site Help"-Section.

thanks for all the replies!

@kundal - actually no i'm not German but rather American (whatever that means these days) but I got a little german :slight_smile:

@steje - it's basically just creating an empty folder based on a selected file's audio tags at the moment. reason is, I always keep album art in a subfolder (see screen, top pane)

and when i'm sorting audio files, I find myself always manually creating a folder called album art, and pasting the band's name into the filename. so, to be able to select a file, and create a folder based on it's tags, for example %artist% - %album% - Album Art = "Fury In The Slaughterhouse - Mono - Album Art" would save me lots of trouble :stuck_out_tongue:

@AlbatorV - my install path is the same as yours, the code you guys gave me, I just paste that into a button? it doesn't seem to do anything :frowning:

thanks again everyone

@ everyone:

the script up top, which is for renaming a parent folder based on tags, could it be changed to just create a folder based on tags, by doing the folllowing?


Rename FILEINFO TO="{mp3artist}{mp3album}{mp3year}"


CreateFolder FILEINFO="{mp3artist}{mp3album}{mp3year}"

? guessing at this :confused:


CreateFolder FILEINFO="{mp3artist}{mp3album}{mp3year}"[/quote]
"FILEINFO" is only working with "Rename" and not with "CreateFolder" but the the Script could possibly be modified to do what you want. If you read the link I provided in the original post about "Abusing Rename Scripting..." you may get an idea how it works.
You'll need some knowledge of VB-Script to modify the Script. I can't do this for you but perhaps someone else can.

Where did you paste it? Don't paste it into the single line in the Buttoneditor. You'll have to click the "Advanced-Button" first and paste it into that Window. If you see 4 Spaces at the beginning of each line you'll have to delete all of them to make it work.

Of course the Button will only do something if a Musicfile containing the needed tags is selected. It will allways work on the first selected file. If this file isn't a tagged Musicfile it will do nothing.

I thought so because of your nick (der_affe = the_monkey). It's not very friendly in german if you call someone "Affe". It means he behaves like (and has the IQ) of an ape :smiley: .

Probably you misunderstood what the Button does. To clearify this:
It renames the current active folder according to the tags of a selected musicfile inside this folder.
So if you select the first *.mp3 in your first screenshot (...01 - Are You Real.mp3) it will rename the containing folder to "Fury in the Slaughterhouse - Home Inside - (2000)"

kundal - does this look right to you?

Yes it looks good. If it's not working you should delete all the other spaces at the beginning of a line so everything is at the left side.
You can also set "Label" and "Tip" to whatever you want to describe the function of the button and choose a proper icon to make it perfect.

yeah kundal, i gave myself this name because regarding directory opus, i have the smarts of an ape, so it's appropriate :neutral_face:

maybe i need to install visual basic or something ?

Visual Basic should run on Windows out of the box I think. Perhaps you disabled the WSH-Function on your PC for some security reason. To test this you can try to create a textfile containing the following code and rename it to "StartNotepad.vbs". If doubleclicking the file starts notepad your WSH is working. Otherwise you should ask Google how to enable it.

Option Explicit Dim WSHShell Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "C:\Windows\notepad.exe" WScript.Quit

kundal, i ran the test and it's working, so i guess wsh is enabled.

i have no idea why its not working, but in any case, i appreciate all the help.

to anyone who might be reading, have you tried this function, and does it work for you?

thanks :open_mouth:

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: