Renaming files and folders

dasadler
5StarLounger
Posts: 889
Joined: 25 Jan 2010, 16:26
Location: Garden Grove, CA 92844 USA

Renaming files and folders

Post by dasadler »

I have noticed for some time now (and become increasingly frustrated) that I encounter problems trying to rename a file or folder. For example,

I might have a folder XYZ and an Excel file open that is normally in folder XYZ. When finished with the file, I will save the Excel file to the folder and close Excel. Then I realized I meant to give it another name so I go to Windows Explorer and rename it. Only to be denied with a message telling me the file is open in another application. I KNOW it is not open in any other application.

At his point, I either do a restart so I can rename the file. Or I forget about for a while as I am busy elsewhere and then I come back to the computer and I am able to rename the file.

It seems as if Windows is not aware that I saved and CLOSED the file and the application so it does not allow a rename.

Is there any work around or any means to force Windows to accept that the file is closed?
Don

User avatar
stuck
Panoramic Lounger
Posts: 8176
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: Renaming files and folders

Post by stuck »

If you are too speedy with the rename then Excel might not have finished putting its toys away so the folder still holds a hidden 'lock' file, which prevents Windows doing the rename. When you return later, Excel has finally finished closing everything and the lock file has been deleted, so Windows can do the rename.

If you set Explore to show hidden files then you will see these temp lock files appearing and disappearing as you work with Excel (and Word too).

Ken

User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Renaming files and folders

Post by HansV »

Windows should release the file once it's closed, but it might take a second or two; I haven't seen the behavior you describe.
Have you checked in Task Manager (Ctrl+Shift+Esc) whether Excel is still running invisibly when this occurs?
Best wishes,
Hans

dasadler
5StarLounger
Posts: 889
Joined: 25 Jan 2010, 16:26
Location: Garden Grove, CA 92844 USA

Re: Renaming files and folders

Post by dasadler »

Thanks all.

No, I haven't checked to see if Excel is still running ( I will do that next time it happens, though). I agree that there is likely a lock file in there. As I said, not a big deal... I just need to learn a little patience. I thought there might be some sort of refresh trick for Windows.
Don

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Renaming files and folders

Post by Rudi »

As Hans mentions, either Excel has not closed properly and you will still see an Excel.exe entry in task manager, or you might be closing down the file and Excel is still running without any workbooks open. In both these events I have found that a file cannot be renamed/deleted. In the latter, it works if I close the Excel application. In all cases the rename works if I access the task manager and end task on the Excel entry.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

dasadler
5StarLounger
Posts: 889
Joined: 25 Jan 2010, 16:26
Location: Garden Grove, CA 92844 USA

Re: Renaming files and folders

Post by dasadler »

Thanks - that sounds like a good solution.
Don