Welcome Guest

Pages: 1 2
Symbolic Linking PLEASE!!
2MR2PostMay 22, 2013, 21:26
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicRe: Symbolic Linking PLEASE!!

I'm working on a modification to the Move and Create Symbolic Link functions which would allow you to specify a rename template for the 'file' component.

2MR2PostMay 24, 2013, 21:50
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicRe: Symbolic Linking PLEASE!!

The final v2.2 implementation of the Create Symbolic Links action function now allows the specification of a rename template. By using this template you can add another constructed path component by using the 'Folder Start' construct. Using the same template the resultant filename can also be constructed.

PowderPostJune 11, 2013, 15:06
Pro
Posts: 116
Registered:
March 4, 2013, 18:53
Hot topicRe: Symbolic Linking PLEASE!!

Thanks for implementing the folder-symlink-feature.

I just tried to create a folder symlink with these settings.
Image

The preview results in this:

/Volumes/m/music/Singles_EPs/Fracture_&_FD/Fracture_&_FD-2012-Galvanise_-_No_Rest-[SUBTITLESUK012]/01_Fracture_&_FD-Galvanise.mp3
--> /Volumes/m/music/Genres/Drum & Bass/2012/Volumes/m/music/Singles_EPs/Fracture_&_FD/Fracture_&_FD-2012-Galvanise_-_No_Rest-[SUBTITLESUK012]

I have tried with and without the field once enabled, but I’m not sure what it means. The result is not what I expected. It’s not relative. I would like a result like this:

(folder symlink)
/Volumes/m/music/Genres/Drum & Bass/2012/Fracture_&_FD/Fracture_&_FD-2012-Galvanise_-_No_Rest-[SUBTITLESUK012]
-->
(actual folder)
/Volumes/m/music/Singles_EPs/Fracture_&_FD/Fracture_&_FD-2012-Galvanise_-_No_Rest-[SUBTITLESUK012]

Seems like the relative option is not working.

By writing this I noticed, that the fields (genre in this case) use spaces, which I would like to replace with underscores in the filename. A checkbox which does that would be nice, too.

2MR2PostJune 11, 2013, 15:31
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicRe: Symbolic Linking PLEASE!!

Yep, this is a bug. The bug is not in the relative handling but how I'm extracting the folder component to use as the name of the link. I'm pulling the entire folder path as opposed to the last component of the path to use as the name. Look for a released patch later today. I'll see if I can squeeze in the space to underscore option as well.

PowderPostJune 11, 2013, 18:42
Pro
Posts: 116
Registered:
March 4, 2013, 18:53
Hot topicRe: Symbolic Linking PLEASE!!

Thanks once again for this quick fix! It’s working great now!

PowderPostJune 13, 2013, 04:24
Pro
Posts: 116
Registered:
March 4, 2013, 18:53
Hot topicRe: Symbolic Linking PLEASE!!

I just recognized, that using a rename template won’t let me create a folder symlink (as expected).

This is the actual release:
Music/By_Artist/S_O_H_N-2012-The_Wheel_EP-[ASP001D]/01_S_O_H_N-The_Wheel.mp3

I would like to use rename template to create a folder symlink like this:
Music/By_Label/Aesop Label/[ASP001D]-S_O_H_N-The_Wheel_EP-(Year)

The problem is now, that the rename template will create a new folder and into that a folder symlink to the release. It looks like this:
Music/By_Label/Aesop Label/[ASP001D]-S_O_H_N-The_Wheel_EP-(Year)/S_O_H_N-2012-The_Wheel_EP-[ASP001D]

Can you add a something like this?

If(folder_symlink && rename_template_used){
create_normal_folder_symlink()
String new_folder_name = extract only the folder part from rename template (ignore file part like 01-artist-title.mp3, so only the folderStart part)
rename newly created folder symlink to new_folder_name
}

2MR2PostJune 13, 2013, 07:21
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicRe: Symbolic Linking PLEASE!!

The way I envisioned it is that the rename template always describes the last component. In the case of a folder symlink that's the name of the link. It made sense for me to use the basic template as opposed to the 'Folder Start' part as the template is not being used to rename the parent folder. I understand that in this case it might require you to have similar rename templates to do almost the same thing.

The 'Folder Start' component in the rename template let's you squeeze an additional path component.

From the documentation:

To summarize the destination location is calculated as follows:
...
For links to folders:
- an absolute or relative base path.
- optionally up to three path components based on field contents.
- an optional path component constructed by the Folder Start construct in a rename template.
- The original folder name or a constructed name from a rename template.

I would imagine that this would work:

In the Create SymLink action:
relative up to Music
component1: <empty> placeholder: By_Label
component2: <Publisher> placeholder: <empty>
component3: <empty> placeholder: <empty>

Rename template:
[<field which contains ASP001D]-<title>-(<year>)

I've made some assumptions about your fields but the above should be close.

I know that there are people using 'Folder Start' as described in the documentation in order to get another customizable path component so I can't overtly change the semantics at this point.

Let me know if the above makes sense.

PowderPostJune 13, 2013, 08:33
Pro
Posts: 116
Registered:
March 4, 2013, 18:53
Hot topicRe: Symbolic Linking PLEASE!!

Thanks once again for the quick help!

Using the rename template without the folder-start field works as expected!

I’m very happy now! 🙂

Going to start a big tag session…

Pages: 1 2
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.019 seconds.