INTERACT FORUM

Please login or register.

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

Author Topic: Check if files have been renamed  (Read 906 times)

pahunt

  • World Citizen
  • ***
  • Posts: 236
Check if files have been renamed
« on: October 29, 2005, 04:26:09 am »

I want a smartlist that tells me whether a file has been renamed in line with my default template, which is

[Track #] - [Name]

I have managed to come up with the following expression which nearly works but not quite

[=IsEqual([Filename (name)],If(IsEmpty([Track #]),00,If(IsRange([Track #],1-9),0[Track #], [Track #])) - [Name].[File Type],1)]=0

The problem is if a track name contains a question mark it gets replace with a underscore in the filename because Windows doesn't allow question marks in filenames. So this means my expression thinks any tracks with question marks in the filenames do match the template.

Can anyone come up with to sort this out?

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Check if files have been renamed
« Reply #1 on: October 29, 2005, 05:24:41 am »

Actually, if you are going to change the filenames and viewing a list is not necessary MC has the needed logic build-in. Just select all audio files and run the Rename From Properties function. You will see that MC shows a popup window* where it states how many filenames are going to be changed and asks for a permission to continue. MC doesn't rewrite the filenames needlessly.

If viewing the smartlist is a must, you could first just run a search for illegal filename characters in the Name fields. The resulting list should be relatively short and quite easy to check visually if the Filename field is visible. As a test I did a search for the ? and : characters. The search found about 300 files from a library of about 40000 files.


* Edit: This window won't appear if no changes are needed or only a few names are going to be changed.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

pahunt

  • World Citizen
  • ***
  • Posts: 236
Re: Check if files have been renamed
« Reply #2 on: October 29, 2005, 11:35:25 am »

Thanks for the reply Alex.

I realise that MC only renames files it needs to and this was not the reason for me creating this smartlist. Because I import a lot of files by right-clicking in Windows Explorer and selecting Import, I have to remember to rename them once they're in and I've set the tags correctly. What I was hoping for but looks like doesn't exist is an expression that would allow me to view a track name with all the illegal characters replaced with an underscore.

Thanks for your suggestions though.
Pages: [1]   Go Up