Script Refusing to open

When creating scripts I tend to save it to the desktop and not bother renaming. If there are problems with the script I often save as under a different name to try something out. Once I've finished I then give
it a proper name and put it in a folder.

Recently I finished one and then renamed it. However after that it refused to open. I made sure the name of the folder was the same as the script and tried opening the programme itself and then from there going to file, open and selecting my script but it said there was an error. All my other scripts opened fine.

Any ideas?
Thanks

When you say "script" do you mean "Arduino sketch"?

What platform (OS) are you using?

How did you rename the sketch?

Is it possible to post the open-restive sketch?

yeah an arduino sketch

What is the error you are getting when you try to open the sketch?

It just says "an error occurred"