My aim is this, to turn every "pack" folder in
C:\111\set1\members\set1\pack
C:\111\set2\members\set2\pack
C:\111\set2\media\pack <-- NOT TO BE PROCESSED
C:\111\set3\members\set1\pack
C:\111\set3\sub\pack <-- NOT TO BE PROCESSED
INTO
C:\111\set1\pack
C:\111\set2\pack2
C:\111\set2\media\pack <-- NOT PROCESSED
C:\111\set3\pack
C:\111\set3\sub\pack <-- NOT PROCESSED
And, dear lhunath has suggested this:
for file in /cygdrive/c/cygwin/1111/*/members/*/*; do
while [[ -d "$destination_$i" ]]; do
let i++; done; mv "$file" "${destination}_$i";
done
with $destination meaning:
${file%/../..}
but I still can't express the "$destination_$i" part correctly...
Plus, whatever way I may try,
I always get a "bash: syntax error near unexpected token `do'"