Couple folder creation questions

Hey Kundal, the line you mentioned:

  • The line "Select *(.mp3|.flac|.ape|.ogg|.mpc) "

It's actually not AlbatorV's fault, I added that in myself, sorry about that. You must have a mixture of different types of audio files in the folder you're renaming, I didn't think about that, since the audio files in my folders are almost always of the same type- I see your point thought :stuck_out_tongue:

A question--

The folder renaming script, could it somehow be used to rename multiple folders based on the tags of their audio content, without having to click into each one of them? This ability would be enormously useful to me, as I have some older albums in my collection, who's folder names i'd like to change to reflect year... screen:

I tried flat view and using the rename parent folder from tags script, but it didnt work right- anyone have any ideas/

thanks again

question- is there a such thing as specifying relative folder paths? for example:

move "folder" to "Album Art" would move the folder to any folder with a name containing "album art"

is there a such thing?

Yes, but not the way you suggest. You can use ..\Album Art to address a folder in the current parent folder (i.e. up one level), or ....\Album Art to go up two levels.

Regards, AB

aussieboykie, thanks for the reply- what about a folder in the same directory, not parent or further up?

say for example, to move a folder called "test" to any folder in the same directory, containing the text "album art"

[quote="der_affe"]aussieboykie, thanks for the reply- what about a folder in the same directory, not parent or further up?

say for example, to move a folder called "test" to any folder in the same directory, containing the text "album art"[/quote]
To refer to a folder at the current level just specify its name or use [b].[/b]. For example, if Album Art is in a folder called Folder1... Folder1\Album Art or .\Folder1\Album Art will locate it.

Regards, AB

[quote="aussieboykie"][quote="der_affe"]aussieboykie, thanks for the reply- what about a folder in the same directory, not parent or further up?

say for example, to move a folder called "test" to any folder in the same directory, containing the text "album art"[/quote]
To refer to a folder at the current level just specify its name or use [b].[/b]. For example, if Album Art is in a folder called Folder1... Folder1\Album Art or .\Folder1\Album Art will locate it.

Regards, AB[/quote]

thanks aussieboykie- i got it working, but only if i specify the exact name of the destination folder.. what i'm asking, is if you can set a partial folder name , because the folders always contain the text "album art" but always have different letters as well. a wildcard name containing the phrase "album art" maybe?

for example, what code would you use, to move the folder "test" into the folder "bowie album art" only using the partial folder name "album art" not the whole folder name "bowie album art" ? this should be interesting :laughing:

This is probably a stupid question but wouldn't it be easier to just use "album art" as the folder name?

Why do you need the artist name to be part of the album art folder when it's already inside a folder that identifies the artist?

Hey Leo thanks for your time-- i see your point, but usually i do name the folder artist - album - album art. sometimes i do a search, and i see many results for "album art" so i name the folder with the artist so i can better identify the folder :wink:

When searching, couldn't you use the Location column to identify the folder? It would show you the parent folder name, with the artist in it.

yeah i could try that leo, it's not crucial in any case, but i did wonder if it could be done, thanks again

I was wrong- wow, the grouped flat-mode works excellent in conjunction with these folder renaming operations. you can easily clean up multiple folders' names by highlighting a track then clicking the rename button- just be careful where you highlight before you click :slight_smile:

see screen:

what do you guys think :slight_smile:

Quick question to kundal or albatorv-- this line of script which creates a folder, how could it be modified to rename an existing folder?

strCommand = """" & DOpusRTPath & """ /cmd CreateFolder """ & artist & " - " & album & " - " & "Album Art" & ""
Shell.Run strCommand,0,false
End if
End Function

Quick answer : read the 3 pages of this post and try to understand scripts!

albatorV, this is the last help i need with this man, help me out ;( i dont know scripting, though im interested in learning some. for now, i'm trying to get some functionality set-up

@der_affe:
I'm not able to write VB-Script myself. I'm only able to modify existing scripts if I understand how it works. The only thing I can do for you is to help you understanding the Script we're playing with here. I'll try to explain the most important steps in the variation I made for you adding the bitrate.

The first line:

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

tells dopus.exe which information to read from the selected file and to separate the items by underscores.
The resulting string will be passed to the Script (strNewName).

After announcing all needed variables (Dim artist etc.) and the path to the program you want to use to process the whole thing at the end (DOpusRTPath) the Script splits the strNewName-string into parts by looking for the underscores as separators:

strInfoArray = split(strNewName, "_")

The line strNewName = "" is needed because you don't really want the selected file to be renamed and therefore set strNewName to nothing.

In the next step the elements the Script found by splitting the strNewName-string are defined by name and position:

artist = strInfoArray(0) album = strInfoArray(1) annee = strInfoArray(2) bitrate = strInfoArray(3)
The last step is to pass the information to dopusrt.exe as a command that can be executed.
The line:strCommand = """" & DOpusRTPath & """ /cmd CreateFolder """ & artist & " - " & album & " - " & "(" & annee & ") " & "(" & "mp3 " & bitrate & ")"""
will result in the Output:

"C:\Program Files\Directory Opus\dopusrt.exe" /cmd Rename {filepath$|..|noterm} TO="Artist - Album - (Year) (Extension Bitrate) which can be executed by dopusrt.exe (Shell.Run strCommand,0,false).

To modify this Script to fill in additional things in the resulting command you have to add it to the first line (e.g. {ext}) separated by an underscore, announce the new variable to the Script (Dim Extension), define Name and position (Extension = stringinfoarray(4)) and add it to the "strcommand-line" which is the most difficult part to understand because of all those confusing quotes. The simple rule is that the Elements you defined don't need quotes to be added here (e.g. & Extension). Everything you want to add "as written" needs quotes (e.g. " - " adds Space Minus Space).

Understanding all this you should be able to modify the Script by yourself (e.g. use CreateFolder or ClipboardCopy or whatever in the strcommand-line). The Script could also be modified to work with Images and their Fileinfos.
But what you now want to add needs a completely new procedure to be added to the Script (Search for a folder containing "Album Art" in it's name). This can only be done using some regular expressions and telling the Script how to handle them.
I'm not able to do this for you.

Kundal, thanks for the reply and your time- i've been busy with some other things in life, but i'll get to this and do some studying on it :smiley:

Thanks to everyone who took time out to help me, kundal, albatorV, leo, steje, aussieboy, and anyone else i forgot :smiley:

i've learned quite alot more about dopus these late days, and my use of it has become far more productive now that i understand some basics about file operations, in addition to opus' excellent file navigation abilities.

thanks again!