1 |
I've found this script that copy and resize file on the fly from one location to another. |
2 |
|
3 |
for INPUT in ./*.JPG; do OUTPUT=/media/stick/`echo $INPUT | sed 's/\.JPG/\_new\.JPG/'`; echo $INPUT /media/stick/$OUTPUT; convert $INPUT -scale 800x $OUTPUT; done |
4 |
|
5 |
I go into each directory manually and run this command, however my camera was originally |
6 |
set to start the same file name every time I empty it so I have the same file name in may directories (the are not unique) so every time I run this script it re-writes |
7 |
the original one. |
8 |
|
9 |
The ideal situation would be go into each directory and create the same director directory on the destination disk with modified files |
10 |
Can anybody suggest how can I rewrite this script to copy files together with directory or change the file to a unique one. |
11 |
|
12 |
I would like to span all directory I'm IN and bellow and run that script on any directory below. |
13 |
|
14 |
-- |
15 |
Joseph |