INTERACT FORUM

Please login or register.

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

Author Topic: Question on expressions  (Read 763 times)

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Question on expressions
« on: May 21, 2005, 11:44:22 pm »

I am trying to rename a TON of pictures by their folder name, with numbers after them.

I have been using Thumbs to do this, but it's quite tedious.  I have over 200 folders, and I have to do each one by hand.

I want to use MC to do this, but can't figure out how.

i have written an advanced expression using the Mid() command, since they are all in the same subdirectory, and I can start at the right spot and show all the rest of the filename.  This method, however gives me the folder info I want, but also includes the filename.  All of the filenames are of different lengths, so i can't bulk exclude by that.

Is there any way to use the Mid() to get the beginning of the folder info, but use the [Name] field to remove the name info at the end?

The Expression might look something like this...

=(Mid([Filename], 45, -1)-[Name])

or maybe using the Clean() function?

any ideas?

Thanks!!!!!
Logged
pretend this is something funny

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Re: Question on expressions
« Reply #1 on: May 22, 2005, 12:14:56 am »

Okay, I've got this far.

With the following expression, I get the folder path info I want (it includes a \ at the end, but I can work with that).

Mid(FilePath([Filename]), 45, -1)

but it is only in a custom field.  I can't figure out how to rename using that expression.  If I rename from properties, it doesn't work.  If starts too late in the path.  If I change the 45 to 23 to correct for this, it still starts too late (in the same spot).

If I could figure out how to use these results to bulk rename, I'm pretty much there.

Any ideas?

Thanks again!!!
Logged
pretend this is something funny

EpF

  • Citizen of the Universe
  • *****
  • Posts: 649
Re: Question on expressions
« Reply #2 on: May 22, 2005, 02:21:38 am »

Hi Justin; Can you give us some examples of the filenames/paths you're working with...
Pages: [1]   Go Up