i have created a file named test.bat on my desktop
named it "test.bat" and sent it to notepad, written "REM" and saved it.
then i closed notepad and reopened it, added another "REM" and saved the file again.
then i tried renaming, moving the file to another folder and deleting it
all went without any problem.
but if i create the file and execute it, the command prompt will appear for a moment and then disappear,
i can rename or move the file without any problem,
but if i try to modify the file in notepad, i get this error:
The process cannot access the file because it is being used by another process.
and the file is not saved.
also, if i try to delete the file it seems to be deleted .. until i press F5,
the file reappears.
when trying to rename/move that new file i get another error:
File Access Denied
You need permission to perform this action
You require permission from the computer's administrator to make changes
to this file
it seems the file is unlocked (or gone if i choose to delete) after a few minutes,
while it doesn't if i try to access
the file (i kept pressing F5 every few seconds for 15 minutes and the file isn't gone)
the problem seems to occur with any file name, anywhere, not just the desktop or the home drive, not even on the same disk, while i didn't have any problem when i booted into an old windows xp installation and repeated the same steps.
i tried using handle utility from sysinternals, this is what i've got:
after creating test.bat: C:\Users\User>handle test.bat
Copyright (C) 1997-2013 Mark Russinovich
Sysinternals - www.sysinternals.com
No matching handles found.
after executing test.bat:
C:\Users\User>handle test.bat
Handle v3.51
Copyright (C) 1997-2013 Mark Russinovich
Sysinternals - www.sysinternals.com
System pid: 4 type: File A18: C:\Users\User\Desktop\t
est.bat
got the above result after trying to delete test.bat too.
after creating othertest.bat:
C:\Users\User>handle othertest.bat
Copyright (C) 1997-2013 Mark Russinovich
Sysinternals - www.sysinternals.com
No matching handles found.
after executing othertest.bat:
C:\Users\User>handle othertest.bat
Handle v3.51
Copyright (C) 1997-2013 Mark Russinovich
Sysinternals - www.sysinternals.com
System pid: 4 type: File BD0: C:\Users\User\Desktop\o
thertest.bat
after renaming othertest.bat:
C:\Users\User>handle othertest.bat
Copyright (C) 1997-2013 Mark Russinovich
Sysinternals - www.sysinternals.com
No matching handles found.
C:\Users\User>handle renamedtest.bat
Handle v3.51
Copyright (C) 1997-2013 Mark Russinovich
Sysinternals - www.sysinternals.com
System pid: 4 type: File BD0: C:\Users\User\Desktop\r
enamedtest.bat
the also occurs when i execute any .exe file and delete it after its finished executing, i deleted
both handle.exe and handle64.exe after performing the above test and both returned when i refreshed their folder.
can anybody help me out?
iam using Windows 7 ultimate 64 bit.
thank you.