I tried to do this operation in vain.
I'll try to explain what I want to do: I have many folders each one contains a file:
Folder.Name(contains File.Name)
Folder.Name.1 (File.1.psd) => Folder.Name.1 (Folder.Name.1.psd)
Folder.Name.2 (File.2.psd) => Folder.Name.2 (Folder.Name.2.psd)
Folder.Name.3 (File.3.psd) => Folder.Name.3 (Folder.Name.3.psd)
Folder.Name.4 (File.4.psd) => Folder.Name.4 (Folder.Name.4.psd)
Folder.Name.5 (File.5.psd) => Folder.Name.5 (Folder.Name.5.psd)
....
what I want is to rename each file with the folder's name like this...
Then, when renamed, why not moving all text files to a new directory

I used to do all this using linux easily, so I hope that TC can do it under linux

Thanks in advance