↓ Skip to Main Content

Blackcat Software

Main Navigation

  • Home
  • What We Offer
  • Products We Support
  • Contact Us

Rename Jpgs in a Directory with a Prefix and Sequential Numbers

Dave Posted on 01-Jul-2014 Posted in Linux Tagged with bash, fast, JPEG, Linux, prefix, script, sequential number, unix
$ cd pictureDirectory
$ find -name '*.jpg' | gawk 'BEGIN{ a=1 }{ printf "mv %s MY_FILE_PREFIX_%02d.jpg\n", $0, a++ }' | bash 

Adapted from Pero’s post at Stackoverflow.

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Like this:

Like Loading...

Related

Post navigation

Previous Post is ‹ Dynamic Libraries dylib for Office using XCode 5
Next Post is TrailLife required fields ›
© 2022 Blackcat Software | Powered by Responsive Theme

‹ › ×

    ‹ › ×
      %d bloggers like this: