INTERACT FORUM

Please login or register.

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

Author Topic: Environment variables for location of media files?  (Read 2732 times)

unfrostedpoptart

  • Junior Woodchuck
  • **
  • Posts: 79
Environment variables for location of media files?
« on: April 13, 2016, 07:17:35 pm »

Hi.  I'm specifically asking about Mac, but could apply to Linux or Windows.

I keep all my files on a Drobo 5N NAS that's mounted on my Mac as /Volumes/media.   I also back this up to a portable 2TB drive for safety and to take with me when traveling.   I have a semi-ok hack now but it's a bit flakey.  I have scripts that create links to either the NAS mount or the USB drive mount so it always appears in ~/ALL_MEDIA.   I use ControlPlane (http://www.controlplaneapp.com) to run the NAS link script if I'm on my home LAN and the other one if the USB drive is mounted.  It works much of the time but sometimes MC follows the link and when adding a bunch of new media I find that it's all hard-pathed to one drive or the other.  Then I have to start messing with the library tools...

So, can MC pick up environment variables for the base path of the media files?  Separate for music, video, image would be even better.   Really amazing would be to set a primary and backup path so MC would try my NAS first and then try the USB drive if it doesn't find the NAS.

Thanks for any related info and pointers.

 David
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Environment variables for location of media files?
« Reply #1 on: April 15, 2016, 07:21:04 am »

I don't think MC can work the way you are describing with an environmental variable.  I haven't tried making symlinks, but it sounds like that doesn't work because MC resolves the real path?

I guess I'd suggest building another library and changing the paths via Rename, Move, and Copy files.  You can clone a library, then switch to that library and use RM&C to change all of the paths to a new base path.  It would probably take 3 minutes end to end to do it that way.  As long as you had made a recent backup of the media files to your travel drive, you'd have all of your files represented in the new travel library.

Seems like a fairly quick and easy solution.  Though I obviously don't know all of your requirements.

Brian.
Logged

unfrostedpoptart

  • Junior Woodchuck
  • **
  • Posts: 79
Re: Environment variables for location of media files?
« Reply #2 on: April 17, 2016, 12:57:06 pm »

Thanks.  I just used the Rename, Move, Copy Files -> Update Database to a new Location -> Find & Replace to have all the filenames point to the NAS mount point.  It takes seconds.  If I'm traveling with the USB drive, I'll just have to do this again and then switch it back at home.  Not automatic, but I don't do this often.

 David
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Environment variables for location of media files?
« Reply #3 on: April 17, 2016, 01:48:56 pm »

That's a good solution too.  Probably even better than my suggestion actually.  :)

Brian.
Logged
Pages: [1]   Go Up