INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Skip empty fields on file renaming?  (Read 1091 times)

dasfoo

  • Junior Woodchuck
  • **
  • Posts: 61
Skip empty fields on file renaming?
« on: October 10, 2010, 01:50:44 am »


I have a lot of video files I'm now trying to manage with MC15, which I've used for many years for my music files. I've run into a new quirk in the File Renaming feature that never came up when managing my music, because I organize them differently.

I'd like to organize the files primarily by genre, then by grouping, then by series. However, while all videos have a Genre assigned, not all have an applicable Grouping or Series. A majority have neither. Some have both. Some one or the other.

When I use the bulk renaming feature to move the files into the preferred directory structure, I'm getting results like this for a majority of the files:
Genre\Unknown Grouping\Unknown Series\Name.m4v

It would be great if instead it could skip null fields on a per file basis.

So, videos with only a genre specified would be written:
Genre\Name.m4v

Those with a Genre and Grouping:
Genre\Grouping\Name.m4v

Those with a Genre and Series:
Genre\Series\Name.m4v

Those with all fields:
Genre\Grouping\Series\Name.m4v

As it is now, I have to do separate renaming batches for each configuration to avoid creating "Unknown Field" directories for any file that lacks an inapplicable value.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9143
Re: Skip empty fields on file renaming?
« Reply #1 on: October 10, 2010, 06:33:17 am »

copy the blue text and paste into the directory field of the rename tool:

[Genre]if(isequal([Grouping],unknown,8),,\[Grouping])if(isequal([Series],unknown,8),,\[Series])\

Why isequal, and not isempty? Read more here, paying particular attention to the third example.

-marko

dasfoo

  • Junior Woodchuck
  • **
  • Posts: 61
Re: Skip empty fields on file renaming?
« Reply #2 on: October 10, 2010, 01:35:44 pm »

copy the blue text and paste into the directory field of the rename tool:

[Genre]if(isequal([Grouping],unknown,8),,\[Grouping])if(isequal([Series],unknown,8),,\[Series])\

Why isequal, and not isempty? Read more here, paying particular attention to the third example.

-marko

That looks delightful! I'll give it a try, thanks.

UPDATE: Perfect. Thanks a lot.
Logged
Pages: [1]   Go Up