INTERACT FORUM

Please login or register.

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

Author Topic: Renaming files  (Read 1246 times)

sbdallas

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 74
  • My only friend is a goat.
Renaming files
« on: September 30, 2011, 03:03:13 pm »

I'm trying to create a preset for renaming files.  Here is what I have for the directory...

[Artist]\[Date] - [Album] If(IsEmpty([Disc #], 1), , (disc [Disc #]))

The goal is...

Pink Floyd\1973 - Dark Side of the Moon\
Pink Floyd\1979 - The Wall (disc 1)\

The problem is the last close parentheses.  This works fine when there is a disc #, but when there is not, in inserts an extra parentheses.

Pink Floyd\1973 - Dark Side of the Moon)\

If I take away one of the closing parentheses, then it works fine with no disc #, but when there is one, it lacks the closing parentheses...

Pink Floyd\1979 - The Wall (disc 1\

Does anyone know how to fix this?

Thanks,
Scott
Logged
Scott

I finally stopped drinking for good.
Now I drink for Evil.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Renaming files
« Reply #1 on: September 30, 2011, 03:31:54 pm »

Forward slash to escape the parens:

  /( and /)
Logged
The opinions I express represent my own folly.

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Renaming files
« Reply #2 on: September 30, 2011, 03:32:21 pm »

This should work:

[Artist]\[Date] - [Album] If(IsEmpty([Disc #], 1), , (disc [Disc #]/))

/ is the escape character that can be used when a character would be interpreted as a part of the expression code.

EDIT

MrC was faster...
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re: Renaming files
« Reply #3 on: September 30, 2011, 03:56:13 pm »

This is what I Use

Directories Rule:

Base Path: D:\Music\

Rule: Mid([Artist])\[Artist]\[Album]

File Name Rule:

[Artist] - [Name]

Result

D:\Music\2\2pac\Loyal To The Game\2pac - Changes.mp3
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA
Pages: [1]   Go Up