Folder names in filename

Support for Windows users
Post Reply
RBCC
Posts: 118
Joined: 17 May 2016, 02:23

Folder names in filename

Post by RBCC »

How do I rename files with a parent folder and a child folder. Such as in the picture. I am looking for the website that shows this. can anyone help? John

Image
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Folder names in filename

Post by rednoah »

The {n} series name binding?

You can get file path components via the {f} file binding.

e.g. second element to second-to-last element:

Code: Select all

{f[1..-2]}
:idea: Please read the FAQ and How to Request Help.
RBCC
Posts: 118
Joined: 17 May 2016, 02:23

Re: Folder names in filename

Post by RBCC »

I am a little confused ....

I guess I would like it to read ...

[12-18-1950] Airwolf : Season 1 Episode 1 {t} } Taken from c:\action\Airwolf\Season 1


How is this done, Is there an example that shows this... Where is it? John
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Folder names in filename

Post by rednoah »

{f[1..-2]} is the example solution you're supposed to copy and paste into the Format Editor and play with. You may need to adjust the numbers depending on your path structure.

{f.dir.dir.name} is also possible.
:idea: Please read the FAQ and How to Request Help.
RBCC
Posts: 118
Joined: 17 May 2016, 02:23

Re: Folder names in filename

Post by RBCC »

I keep getting a binding file "f" has not been set,

Here's what I have:

{[airdate]} {f[1..-2]} what is it looking for???? John :? :?
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Folder names in filename

Post by rednoah »

rednoah wrote:Q: Why are some bindings not working in the Format Editor? It says "BindingException: Sample file has not been set"
You have not selected any media file to test with yet. Click Change Sample Image and set a media file.
Please read the FAQ: viewtopic.php?f=3&t=7


I recommend first matching files, then double-clicking the New Names item, so that it can open the Format Editor wit the real match data you're currently processing.
:idea: Please read the FAQ and How to Request Help.
RBCC
Posts: 118
Joined: 17 May 2016, 02:23

Re: Folder names in filename

Post by RBCC »

Thank you for your help Rednoah one last thing....

Using the UI can I do file matching? or is that a cmdline thing only! :? John
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Folder names in filename

Post by rednoah »

Yes. Depending on what :?: using the UI can I do file matching :?: means.

1. viewtopic.php?f=3&t=2072
2. viewtopic.php?f=3&t=3228
:idea: Please read the FAQ and How to Request Help.
Post Reply