-
jackoo
-
RE: bash command line job...
-
All files out of 1005 random directories (called "Foto's") are moved to its upper directory and all 1005 empty dir. "Foto's" are removed by following command:
find ./ -name "Foto\'s" | ./script.b
Down here the content of the file script.b (thanks to MARC! :-)
---------------------------------------------
while read -r directories ; do {
mv "${directories}"/* "${directories}"/.. || { echo "Could not move files from ${directories}"; exit 1;}
rmdir "${directories}" || {echo "Could not remove directory ${directories}"; exit 1;}
} done
---------------------------------------------
-
04 Jan 12
All files out of 1005 random directories (called "Foto's") are moved to its upper directory and all 1005 empty dir. "Foto's" are removed by following command:
find ./ -name "Foto\'s" | ./script.b
Down here the content of the file script.b (thanks to MARC! :-)
---------------------------------------------
while read -r directories ; do {
mv "${directories}"/* "${directories}"/.. || { echo "Could not move files from ${directories}"; exit 1;}
rmdir "${directories}" || {echo "Could not remove directory ${directories}"; exit 1;}
} done
---------------------------------------------