Last active
August 29, 2015 14:01
-
-
Save andytlr/c192f7169e7323efddfb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n=0 | |
while read line ; do | |
let n=n+1 | |
filename=`basename "$line"` | |
dropboxuser=21267 # Replace with your ID | |
directory=/shots/keep/ # This is the full path iside your Public Dropbox directory. The slashes are important. | |
path=~/Dropbox/Public$directory | |
mkdir -p $path | |
date=$(date +%H-%M-%S)- | |
if [ -f $path$filename ] ;then | |
mv $line $path$date$filename | |
printf https://dl.dropboxusercontent.com/u/$dropboxuser$directory$date$filename | pbcopy | |
else | |
mv $line $path$filename | |
printf https://dl.dropboxusercontent.com/u/$dropboxuser$directory$filename | pbcopy | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment