@cfajohnson
Im afraid it still doesnt seem to work, now the script takes out all spaces so when i do
Code:
find $dir -name "*.txt" | while IFS= read -r file; do
mv -i $file `echo file | sed 's/ //g'`
done
i just get the following errors
/etc/file: No such file or directory
name: No such file or directory