Re: Organising photos visually

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

 



On Wed, 2018-01-31 at 07:45 +1100, Cameron Simpson wrote:
> Another untested version with a fix for his bug and a fix for the sleep thing:
> 
>    cd your-staging-directory
>    n=1
>    while :
>    do
>      moved=
>      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"
>        n=$((n+1))
>        moved=1
>      done
>      [ $moved ] || sleep 0.1
>    done
> 
> See how that logic feels to you.

Just an update on this. I tried a lightly-modified version of your
script and got it to work. However as it stands it will only work
correctly if I deal with all the files in a set in one run, and don't
change my mind later about the order I want (i.e. the only way to do so
is to restore the original names and start over).

I'll keep thinking about it in any case. Thanks for your suggestions
(and ditto to Kenny and Rick among others who tried to help).

poc
_______________________________________________
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