INTERACT FORUM

Please login or register.

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

Author Topic: Filepath without Drive structure  (Read 2630 times)

echamp1

  • Junior Woodchuck
  • **
  • Posts: 70
Filepath without Drive structure
« on: January 12, 2011, 03:22:11 pm »

I'm trying to sync my handheld with the same file and directory structure as my music library, but I need help with one thing.

using [filename (path)]\ in the sync path, I can almost achieve this; my files get copied to a folder structure that looks like this in the handheld root: "D_\folder1\folder2\folder3\filename.mp3"

I want to retain all folder paths except the "D_" (the drive path).  Using create new library fields, I'm getting close, but I simply don't have the know how to figure it out.  Does anyone know what sort of expression I need to create a view column that displays folder paths without the drive letter?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Filepath without Drive structure
« Reply #1 on: January 12, 2011, 03:38:55 pm »

I don't know of you can add an expression to the sync path, but you can try:

RemoveLeft([Filename (path)],3)

which removes the left 3 characters from the filepath.  You might only want 2 chars removed.  Season to taste.
Logged
The opinions I express represent my own folly.

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Filepath without Drive structure
« Reply #2 on: January 12, 2011, 03:54:32 pm »

removeleft([Filename (path)],3)  works for me.

A calculated field would work, but you can also simply copy-paste the string directly to the Handheld path options.

Here is more info about the expression language: http://wiki.jriver.com/index.php/Media_Center_expression_language
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

echamp1

  • Junior Woodchuck
  • **
  • Posts: 70
Re: Filepath without Drive structure
« Reply #3 on: January 12, 2011, 04:20:40 pm »

awesome!  Now I have another problem, and I don't know if there is a way around it...

I'm transcoding all my HQ files to "portable" versions.  When using the "removeleft([Filename (path)],3)" expression, the converted files use their new location for the transfer destination, (i.e. User\admin\appdata\roaming\j river\media center 15\temp).  This kills the whole point of the expression.

Does anyone know of a way to point the filepath from the original file location, and not the transcoded file location?

Thanks!
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Filepath without Drive structure
« Reply #4 on: January 12, 2011, 04:40:11 pm »

I noticed the same issue when tested the expression with image files that were resized.

I'd say it's a bug. MC is calculating the expression value from the field value in the temporary file instead of the actual source file.

For now, as a workaround, you can create a new standard user field, select all files and paste =removeleft([Filename (path)],3) in the field. It will create static values that contain the correct paths. However, you will need to maintain the field values manually. They will not adjust according to the possible path changes or populate automatically when you add new files.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

echamp1

  • Junior Woodchuck
  • **
  • Posts: 70
Re: Filepath without Drive structure
« Reply #5 on: January 12, 2011, 06:37:50 pm »

The workaround won't meet my needs for directory structure.  I move files around enough that it'll become a greater headache than just letting MC sync files with the standard [artist]\[album] structure.  Until the temp location bug is fixed, I'll settle with what's simplest.  

Thank you all for the library field expression, that was immensely helpful.
This handheld sync itself is a workaround for another problem I was having regarding Library Sync and/or handheld sync across a network onto a removable drive (SD card).  I posted a topic about it, but no one's answered (http://yabb.jriver.com/interact/index.php?topic=61740.0).

Basically, I am having trouble syncing my main library to my server client with transcoded (portable) mp3s.  When I start the manual sync, it copies the files 1:1 with no transcode.
If I try handheld sync across my network to the SD card, the sync resets on each sync, and creates duplicate files rather than overwriting.  I digress, but if anyone has answers to that... you'd really save my day.  
Logged
Pages: [1]   Go Up