open file and save as script

hi guys

i have a problem with my file did not work as usual. The problem is i need to open the file and save as using same name and after that the file is work properly. Is it any shell script can do open the file and save as using same name..because i have thousand of file with the same problem

I do not understand, sorry.

What is it about your files / scripts that are not working as usual? Can you elaborate?

Did you copy them from one platform to another, for example?

no script file... the file is similar to the pdf file...i need to open the file and save as to the same name then the file working properly...the problem is i have thousand of file..so i need a script file to open every each file than save as with the same name...