Refactor
:my
=>
'code'
Codes
Refactorings
Popular
Best
Submit
Spam
Account
Logout
Login
JavaScript doesn't seem to be activated, expect things to be ugly and sloppy!
Learn How to Create Your Own Programming Language
createyourproglang.com
Recent
Working PS3 Jailbreak 3.65 And 3.66
ExtaBit Premium Accounts and Cookies
Steam Wallet Hack - Money Adder & Hack v3
Empires & Allies Hack Cheat Trainer v5.4.1
Eve Onnline 60 Days Time Card Generator v2
Xbox Lve Generator v3
Better way to get content via jQuery $.get()
Free CarTown Blue Points Generator and CarTown Templates
Steam Wallet Hack 2012
Diablo 3 error 37 & error 3006 fix
Popular
XBOX POINTS GENERATOR - MICROSOFT POINTS GENERATOR v1.2012
11 may 2012 premium uploading accounts 100% working
Free Microsoft Points
Free Microsoft Points - Microsoft Points Generator - Xbox Live Codes 2012
Car Town Free Blue Points Hack
Free CarTown Blue Points Generator and CarTown Templates
Free Microsoft Points
Simple Days Purger
Sharecash Downloader Bypass Surveys New 05/2012
PAYPAL REMOVE ACCESS LIMITED ACCOUNT 100% Working
Pastable version of
Sorting and archiving 1600 images...
<pre class='prettyprint' language='shell-unix-generic'>#!/bin/bash # Get into the right folder cd ~/Website\ Photographs/ # Create input folder if [[ ! -d "input" ]]; then mkdir -p input fi # Create sorted images folder if [[ ! -d "sorted" ]]; then mkdir -p sorted fi # Create archives folder if [[ ! -d "archives" ]]; then mkdir -p archives fi # Create fake image files to process for testing purposes for i in `seq 1 20`; do touch input/ironbark-hi_res-${i}.jpg; touch input/ironbark-lo_res-${i}.jpg; touch input/ironbark-preview-${i}.jpg; touch input/ironbark-thumbnail-${i}.jpg; done # Count fake image files CI=`ls input/ | wc -w`; echo "Created ${CI} fake image files..." # Sort the files automatically into folders for f in input/*.jpg; do DIR=`echo ${f} | cut -d '-' -f 3`; DIR=`echo ${DIR} | cut -d '.' -f 1`; if [[ ! -d "sorted/${DIR}" ]]; then mkdir -p sorted/${DIR}; fi mv ${f} sorted/${DIR}; done # Count sorted sub folders CS=`ls sorted/ | wc -w`; echo "Sorted ${CI} fake image files into ${CS} sub folders..."; # Jump into the sorted folder and archive stuff cd sorted/ # Proceed to archive the contents of sorted 10 folders at a time ls -1 | sort -g | xargs -L10 | while read first rest do zip -9r ../archives/archive_${first}.zip ${first} ${rest} rm -rf ${first} ${rest} done # Get out of sorted cd ..</pre> <pre class='prettyprint' language='shell-unix-generic'>on run tell app "Terminal" activate display dialog "This will sort and archive all the images in folder: ~/Website Photographs.\nAre you sure you want to continue?" do script "bash ~/sort_pics.sh" end tell end run</pre> <a href="http://www.refactormycode.com/codes/1301-sorting-and-archiving-1600-images" style="color:#fff" title="As seen on RefactorMyCode.com"><img alt="Small_logo" src="http://www.refactormycode.com/images/small_logo.gif" style="border:0" /></a>