I have a folder and inside that folder I have 10-15 files with arbitrary names.
The filenames may include spaces in them. For example: wWw.page.com __ (576)_002.
In a terminal, when I press w and then tab the file name appears like this: wWw.page.com\ \ __\ \(576\)_0.txt.
I want some script that will rename all my files like this 0.txt, 1.txt, 2.txt and so on.
My problem is: wWw.page.com __ (576)_002.txt file not found.
index=0;
for i in $(ls *.txt)
do
cp "${i}" $index".txt"
done
Instead of
lstry toglob: