INTERACT FORUM

Please login or register.

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

Author Topic: Rename file from properties an expressions: \ being replaced by _  (Read 1672 times)

CDvd

  • Regular Member
  • World Citizen
  • ***
  • Posts: 208

I often dreamded of a "Rename Files From Properties" that would move my files automagicaly and that would rely on the media's type and tags. So I've set a super tag that shows :

"Photo\Country\Year\Month\Place" for photos
"Genre\Category\Identification" for other images
"Music\Artist\Album"for music
"Books\Author\Bookname" for audio books
....etc

....and hoped that this thing would work if put it in "Rename files from properties" 's directory structure

unfortunatly where the directory structure should be "Photo\France\2006\August\Home", it becomes "Photo_France_2006_August_Home" !!!

\ are turned to _  :o

I understand that this is done to prevent "AC\DC" to be split in two folders... but I'm wondering if there is a way to disable this automatic cleanup ?

That would be a wonderfull thing.

For those who are not already lost in my explications, my expression would become something like :
   if(...not_music... , ...blabla... , Music\clean([Artist])\clean([Album]) ) &Autocleanup=false;
Logged
A computer without COBOL and Fortran is like a piece of chocolate cake without ketchup and mustard.

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Rename file from properties an expressions: \ being replaced by _
« Reply #1 on: September 01, 2006, 01:36:28 am »

you have corresponding tags for these things, yes?

[photo]
[country]
[year]
[month]
[place]
[genre]
[category]
[indentification]
etc. etc.

so, instead of using a "super tag", why not work with what you already have?

My rename from properties expressions take care of just about all things in one go, so that when using the tool, it's simply a case of bringing it up and clicking the OK button...
My directories are defined like so:

IF(IsEqual([media type],audio,1),if(isequal([album],Assorted Tracks,1),Music\[album],if(isempty([disc #],1),Music\[file type]\[album artist (auto)]\[album],Music\[file type]\[album artist (auto)]\[album]\Disc [disc #])),if(isequal([media type],image,1),if(isequal([type],album art,1),Music\[type]\[album artist (auto)],if(isequal([type],unknown type,1),Pictures\!source\[source]\[date (year)] - [filenamedate],Pictures\[type]\if(isequal([genre],unknown genre,1),,[genre])\if(isequal([type],wallpaper,1),[dimensions],))),if(isequal([media type],data,1),Info Files\[artist] - [album],Movies\[genre]))

The only really, really, sad thing about the rename from props tool is that we cannot use expressions in the base path field. If we could, we would be able to dictate which drive a file gets moved to based on its [media type]. I'm hanging out for this to make it's way into v12 :)

-marko.

CDvd

  • Regular Member
  • World Citizen
  • ***
  • Posts: 208
Re: Rename file from properties an expressions: \ being replaced by _
« Reply #2 on: September 01, 2006, 02:33:19 am »

Quote
IF(IsEqual([media type],audio,1),if(isequal([album],Assorted Tracks,1),Music\[album],if(isempty([disc #],1),Music\[file type]\[album artist (auto)]\[album],Music\[file type]\[album artist (auto)]\[album]\Disc [disc #])),if(isequal([media type],image,1),if(isequal([type],album art,1),Music\[type]\[album artist (auto)],if(isequal([type],unknown type,1),Pictures\!source\[source]\[date (year)] - [filenamedate],Pictures\[type]\if(isequal([genre],unknown genre,1),,[genre])\if(isequal([type],wallpaper,1),[dimensions],))),if(isequal([media type],data,1),Info Files\[artist] - [album],Movies\[genre]))
.....
so, instead of using a "super tag", why not work with what you already have?
Wow ! That makes a huge expression and mine could be bigger when finished!
I tryied to apply the rule "divide and conquer" : the supertag is using other calculated tags to simplify things (so I don't end with something that is so long that I cannot debug/change it anymore).
So yes you're right, I'm could do what you suggested (and will) (and I'm feeling silly for not having thought of it  ;D)

Quote
The only really, really, sad thing about the rename from props tool is that we cannot use expressions in the base path field. If we could, we would be able to dictate which drive a file gets moved to based on its [media type]. I'm hanging out for this to make it's way into v12
file management would be sooo easy  :)

Thanks!
Logged
A computer without COBOL and Fortran is like a piece of chocolate cake without ketchup and mustard.

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Rename file from properties an expressions: \ being replaced by _
« Reply #3 on: September 01, 2006, 02:59:21 am »

huge? nah, that's just a baby one!! :D

Putting them together can be a bit sore on the head though.
It can help if you break them into individual expressions and then join them up at the end.
Deal with each media type in turn, closing each branch of if() questions as you go, so that MC knows where to jump to if [media type] is not audio, etc. etc.
If you get duff results using isempty, try using isequal([..],unknown ..,8) instead. The rename from props tool uses that by default, leading the expression evaluator to believe that field is not actually empty, if you get what I mean?
Remember, it's OK to leave blanks, so, in the case of; if(isequal([genre],unknown genre,8),,[genre]) MC would do nothing if the genre is empty, but use it if it's populated.

Good luck :)

-marko.
Pages: [1]   Go Up