Re: Organising photos visually

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ Brought back on list, since Jon is very correct. - Cameron ]

On 30Jan2018 05:09, Jon LaBadie <jon@xxxxxxxxxx> wrote:
On Tue, Jan 30, 2018 at 08:53:32PM +1100, Cameron Simpson wrote:
Run a small shell script like this (untested, but happy to help debug):

 cd your-staging-directory
 n=1
 while :
 do
   for f in *.jpg
   do
     [ -s "$f" ] || continue
     while :
     do
       target=$( printf 'your-ordered-directory/%05d-%s' "$n" "$f" )
       [ -e "$target" ] || break
       n=$((n+1))
     done
     mv "$f" "$target"
   done
   sleep 1
 done

I think all the files will be named 00001-<orig_name>
When there is no name collision you skip the increment.

Yes. Need to increment after the "mv" as well. Good call.

Thanks,
Cameron Simpson <cs@xxxxxxxxxx> (formerly cs@xxxxxxxxxx)
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux