thanks a lot. would you please tell me why ^\s*\d+.?\s*-\s* didnt work for that file name. I am a newbie to regex so could you please tell me where i went wrong.
Formatstring: $trimLeft(%_filename%,'0123456789. ')... or ...Formatstring: $regexp(%_filename%,'^[\d\s.]*',)From:'14. Cant Believe It Feat. Lil Wayne - The Usual Suspects, T-Pain & Akon.mp3'To :'Cant Believe It Feat. Lil Wayne - The Usual Suspects, T-Pain & Akon.mp3'
Convert "Tag - Tag"... or ...Action "Format value"Field: _FILENAMEFormatstring:$replace(%_filename%,'.',)From:'... and then there were three ... .mp3'To :' and then there were three .mp3'... or ...Convert "Tag - Tag"... or ...Action "Format value"Field: _FILENAMEFormatstring:$trim($replace(%_filename%,'.',))From:'... and then there were three ... .mp3'To :'and then there were three.mp3'... or ...Convert "Tag - Tag"... or ...Action "Format value"Field: _FILENAMEFormatstring:$regexp(%_filename%,'^[\s.]|[\s.]$',)From:'... and then there were three ... .mp3'To :'and then there were three.mp3'... or ...Convert "Tag - Tag"... or ...Action "Format value"Field: _FILENAMEFormatstring:$regexp(%_filename%,'^[\s.]*|[\s.]*$|\s*\.',)From:'... and ... then ... there were three ... .mp3'To :'and then there were three.mp3'
thanks a lot DetlevD . i have read many of your posts and it has been very useful.
Again if its not too much could you please tell me what is wrong wth the regex ^\s*\d+.?\s*-\s*
which i am planning to use for removing the spaces,numbers and hyphen in a filename.
In ^\s*\d+.?\s*-\s*
you only used the repetition indicator * bu left out what should be repeated.
Something like
^\s*\d+.?\s.-\s.
may work ...
Still: why do you mess around with the filenames if they could be rewritten much easier with the Convert>Tag-Filename function? You do not have to shift around the character positions in unstructured string data as you use structured data from the tag fields to create the string.
Have a look at this example ...
and check out whether your filenames fit to the regexp or not ...
or otherwise why the regexp does not fit to your filenames ...
Convert "Tag - Tag"... or ...Action "Format value"Field: _FILENAMEFormatstring:$regexp(%_filename%,'^\s*\d+\.?\s*-\s*',)Possible filenames,which should be affected by this regexp ...'3-test.mp3''3 - test.mp3''3 - test.mp3''3.-test.mp3''3. - test.mp3''3. - test.mp3''13-test.mp3''13 - test.mp3''13 - test.mp3''13.-test.mp3''13. - test.mp3''13. - test.mp3''3-test.mp3'' 3 - test.mp3'' 3 - test.mp3'' 3.-test.mp3'' 3. - test.mp3'' 3. - test.mp3''13-test.mp3'' 13 - test.mp3'' 13 - test.mp3''13.-test.mp3'' 13. - test.mp3'' 13. - test.mp3'Result filename is always ...'test.mp3'This filename does not match ...'13. ;-) test.mp3'