multiple file rename using "format" …

mac-osx(sierra) 10.12.6


anyone here consider themselves a mac guru? in mac's finder, selecting several files and depressing the ctrl-key offers those files to be renamed. three different methods in renaming:

    • replace-text
    • add-text
    • format

so, i choose the format method. there’s 100+ files in my work-folder … which i wish to have sequentially numbered. in order to accomplish this, name-format would be set at “name and counter” … where would use “after name” … custom-format would be “test_” … start-number-at would be set at “1”. we can see, at bottom-left of the small interface, an example … in my case, the example appears as test_00001.pdf. eureka, mac-os adds leading 0’s to the file-name.



and this rename feature works really well. by that, i mean first file is 00001 … tenth file shows as 00010 … hundredth file shows to be 001000 … excellent! the leading 0’s are dropping off … so the number of characters in the file always remains the same. if i had a thousand files, another 0 would drop off. all is well and good in mac world.


however … am wondering if it’s possible to reduce the number of leading 0’s. instead of four leading 0’s … i’d like only two leading 0’s. could this be done within mac’s terminal app?


of course, there is a work-around … after performing the rename(format) procedure, i could select all the files and rename(replace-text method) “00” with a “blank” … 00001 would then be 001 … 00010 would then be 010 … 00100 would then be 100 … etc. however, i’d like to consolidate the procedure into a single step, if possible.



another plausible option, i suppose, would be using mac’s automator program … which i have never used.


as always … thanks for everyone’s interest.

iMac Pro

Posted on Feb 19, 2019 3:48 PM

Reply

Similar questions

5 replies

Feb 20, 2019 4:52 PM in response to VikingOSX

vikingosx …


i appreciate you taking time in actually working through the issue … not just offering a cookie-cutter answer … even added a screen-cap to help this old brain of mine. kudos. and … the process you offer does seem like it will work.


it's my intent to keep the question open for a few weeks … thanks again for your interest and insightful response.

Feb 20, 2019 7:45 AM in response to pnmjck

You can use Automator to build a Service that acts on selected Finder items and renames them like the Finder example you have shown. However, the Automator Rename Finder Items, has a Make Sequential feature that allows you to control the number of digits — unlike the Finder rename. Once you save this Service, then you select the items you want to make sequential in the Finder, and run the Service. You can even assign an unused keyboard shortcut to the Service via System Preferences : Keyboard : Shortcuts : Services panel.


Here is an example from Mojave which refers to Services as Quick Actions, but the concept is the same for Sierra.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

multiple file rename using "format" …

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.