INTERACT FORUM

Please login or register.

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

Author Topic: Directory Rename  (Read 3291 times)

Don W

  • World Citizen
  • ***
  • Posts: 185
Directory Rename
« on: August 22, 2013, 03:38:29 pm »

Hello,

All my albums are located on disk in folders where folder name = album name. Now I would like to rename the folders so they contain the album name and year: [Album] (Year). The trouble is that the folders all contain Folder.jpg, which doesn't get moved if I do a normal rename with the Rename, Move and Copy Files dialog, and which prevents the old folder from being deleted. Is there a way to either get the file Folder.jpg to move along with the track files, or instead of creating a new folder and moving the files into it, just rename the existing folder.

Thanks in advance,
Don.
Logged

jctcom

  • Citizen of the Universe
  • *****
  • Posts: 690
  • Rush - Styx - Yes - Porcupine Tree - Staple Food!
Re: Directory Rename
« Reply #1 on: August 22, 2013, 03:52:51 pm »

I would also be interested to know if there is a way to automatically move all remaining files in a folder when performing a Rename / Move option.

Carl.
Logged
Carl's Music: https://cloud.clz.com/jctcom/music
Carl's Movies: https://cloud.clz.com/jctcom/movies

Some of Carl's Equipment:  Yamaha RX-A2A, i7-11700K, 128GB, PCIe X4 2TB M.2 SSD, GTX-970, SMSL DL200

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Directory Rename
« Reply #2 on: August 22, 2013, 09:30:31 pm »

Either do this in MC's Explorer where you can select all the files, or you'll have to both import the file types that you expect to find in your music directory (folder.jpg, JRSecureRip.log, etc.) and create a path-based view that shows all those files.

Then, Rename can work on those.
Logged
The opinions I express represent my own folly.

yannis

  • World Citizen
  • ***
  • Posts: 229
Re: Directory Rename
« Reply #3 on: August 23, 2013, 04:24:13 am »

That's very interesting MrC. Could you please elaborate? Maybe in your Tips of the Week?
Logged

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: Directory Rename
« Reply #4 on: August 23, 2013, 07:34:40 am »

I would also be interested to know if there is a way to automatically move all remaining files in a folder when performing a Rename / Move option. Carl.
I used to do this "semi-automatically" -- but for a number of reasons I've stopped. Try this ... you will have done your backups first, right  ;)?

Import music including folder.jpgs as images to a temporary folder (D:\Temp\AlbumArtist\Album); go to a smartlist; select all, and move them with Copy, Move, Rename to your main music area (eg. D:\Temp to D:\Music) - finished

1) you need to have Images set as a "Feature"
2) you have to set up autoimport so that it allows folder.jpg to be imported (could only be from a "temporary" directory)
3) you have to tag right after import something in a field you use  "retag" or "importfolderjpg or whatever
5) set up a smartlist (in this example I'm only importing flac mp3 and jpg3)

Code: [Select]
[Filename (path)]="D:\Temp\" [File Type]=[flac],[jpg],[mp3] -[Groupings]=[zRetag] ~sort=[Filename (path)],[Album],[Album Artist],[Track #],[Date Imported]-d
Afterwards all you have to do is is run the smartlist .. if it populates select all tracks (CTRL+A) and use the library command Move,Rename,Copy -- set a preset so you only configure this once  -- (forget the preview pane just an example of setting up a move command



Remove or change the tag e.g. NI (for not imported) I (for imported) -- I use my "Groupings" field where I put zRetag and then change it to a "super genre" like Jazz that I would have to do anyway -- If there are any "zRetags" showing up in a pane view, you can pick up where you left off :) Once all is done, running the smartlist will bring up an empty list.

You can do this without the additional tag, but it can get messy if your workflow gets interupted and you rip a lot of disk at a time.

This is very convenient when you are ripping your collection of 3000 or more CDs (nice to get rid of ugly small cover art too -- you can select all the folder.jpgs and remove them from your library and change back your auto import setting to not include them.

HOWEVER, doing this all the time drove me crazy I would have more than 6k folder.jpg's floating around. ok you could filter them iout but ... ::)

There are a number of easy ways to do this on an ongoing basis (not automatic) which might be better for DonW if its a once off operation

1) Mr. C's Way (when in doubt, check MrC out. That's my motto ... is he right all of  the time? Of course not!!! euhh, well most of the time, euh ,yeah he is :-*)  - Go Devices=>Explorer and do what you need within MC -- for cut and paste you will have to use the EDIT commands on the menu bar, otherwise right click. Another way is to right click on a track Locate=>On Disk (internal).

2) Move the files with Rename?Copy,Move then ... If you have set up your Cover Art to Audio mode: same folder as the file, on import

-- select all newly imported; Rightclick=> CoverArt=>Save Cover Art to External Locations Specified in Options (aka the folder where it was). Go to the temp folder; All that will be there are the directories containing only a copy of the folder.jpgs end delete 'em. All good rips will have the cover art embedded in the metadata of the file

3) (I do not recommend this but ...)  Do the renaming outside in windows making sure that MC is running. Run autoimport (Update for external changes and fix broken links must be on in config). Most of the time this works, but you can lose certain info like playing stats and things not written to the metadata in the file. If you must or you are just plain lazy, at least backup your library first  ;)

Had to do this fast so might need clarification. Hope this helps

Logged

Don W

  • World Citizen
  • ***
  • Posts: 185
Re: Directory Rename
« Reply #5 on: August 23, 2013, 08:19:17 pm »

I tried MrC's method but the problem was that the album images (Folder.jpg) don't have the same date as the album tracks, so the images don't end up in the right location when moving to folder with name = "[Name] ([Date])". And I couldn't think of any way to correct the dates of the images.

I ended up using windows explorer search to locate all image files in my Music directory then deleted all the files in the results list. That way when I moved the audio tracks the old directory could be automatically deleted. After moving the files, I recreated the album images with the library tool "Save cover art to external location specified in options". For this to work, in options (File Locations) I have "Audio mode: in the same folder as the file, as Folder.jpg" and I also have "Also store image in the file's tag".

There was one complication with this, which was that not all my files had the image stored in the tag. And I couldn't find a way to store image in file's tag after the fact. Seems that it is necessary to reset the image for it to be stored in the tag. So I had to do online search for image of several albums to reset. I will say that I was impressed at how well the online image search handled multiple albums.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Directory Rename
« Reply #6 on: August 23, 2013, 08:22:20 pm »

The view I use is a Panes view, and the Album and Artist values come from parsing the directory components (from [Filename (path)], and don't use Album and Artist.  This way, you pick up everything inside the folders.  And the File List grouping is based on [Filename (path)].
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Directory Rename
« Reply #7 on: August 23, 2013, 08:27:40 pm »

There was one complication with this, which was that not all my files had the image stored in the tag. And I couldn't find a way to store image in file's tag after the fact. Seems that it is necessary to reset the image for it to be stored in the tag. So I had to do online search for image of several albums to reset. I will say that I was impressed at how well the online image search handled multiple albums.

I  think you can just do Update Tags (from library) to save the cover art.  This is incorrect.
Logged
The opinions I express represent my own folly.

Don W

  • World Citizen
  • ***
  • Posts: 185
Re: Directory Rename
« Reply #8 on: August 23, 2013, 09:45:48 pm »

How do you ensure that the images are moved to the same location as the tracks when you are renaming the album folder so the name includes the album year? I'm doing 100's of albums at the same time, so it has to all be dynamic.

Update Tags (from library) doesn't embed the image in the file. Does seem like maybe it should, though, if "also store image in the file's tag" is checked and the image isn't already there. Maybe a bug?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Directory Rename
« Reply #9 on: August 24, 2013, 01:10:10 am »

It's pretty easy.  Since your audio files contain the metadata you want to drive your rename, you can use global variables to store that data.

In your rename view that you now have, add this to the Set rules for file display (you can add it as a new Custom rule):

[=1ifelse(isequal([media type],Audio),save([album artist (auto)]\[album]-[year],v_rename_filefolder(,1)-filefolder(,0)))]=1

Now, in that view, add a new expression column, with the expression:

load(v_rename_filefolder(,1)-filefolder(,0))

You can see in the attached screenshot how all files in the album now have access to this value.  When you rename, you can use the expression above as part of the rename.   I'm sure you'll want to modify the calculated variable to suit your path needs.  The trick here is knowing that all the files live in the same folder, so you can use the path segment as the key.

Logged
The opinions I express represent my own folly.

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: Directory Rename
« Reply #10 on: August 24, 2013, 01:53:54 am »

Would be so easy if MC would just move the darn folder.jpg like a lot of us have asked for. After all it does create the file.

Ross
Logged

Don W

  • World Citizen
  • ***
  • Posts: 185
Re: Directory Rename
« Reply #11 on: August 25, 2013, 02:00:10 pm »

A rename directory feature would solve this issue in a user friendly manner. I wonder if that would be possible.
Logged
Pages: [1]   Go Up