Author Topic: Underscore instad of blank spaces  (Read 833 times)

Offline filrub

  • Newcomer
  • *
  • Posts: 35
    • View Profile
    • www.filipporubin.it
Underscore instad of blank spaces
« on: June 18, 2021, 07:30:16 AM »
Is there a way to rename a file (for example just before uploading it via ftp) putting underscores instead of blank spaces?

For example: TEST PHOTO 001.jpg to TEST_PHOTO_001.jpg

Thank you all

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24172
    • View Profile
    • Camera Bits, Inc.
Re: Underscore instad of blank spaces
« Reply #1 on: June 18, 2021, 11:11:11 AM »
Is there a way to rename a file (for example just before uploading it via ftp) putting underscores instead of blank spaces?

For example: TEST PHOTO 001.jpg to TEST_PHOTO_001.jpg

Yes, use the following as your rename string:

{filenamebase:0:tr: /_}

See: https://docs.camerabits.com/support/solutions/articles/48001077381-variable-substring-extraction

Note: this is a relatively new feature and requires PM6 (or Plus) build 5820 (current build).  It appeared in an earlier build but I can't recall which one.

HTH,

-Kirk