Link to home
Start Free TrialLog in
Avatar of Claudio Herrera
Claudio HerreraFlag for Mexico

asked on

PendingFileRenameOperations Batch file help need it in order to work

Dear Experts

I found this batch file and I wanted to work under Win XP SP3,

I need a batch file to delete protect files by windows or when the file it is being used by another person or progam the only way to do this is after restart

For testing purposes I will use the following path
C:\Documents and Settings\Rebelscum\Desktop\test.txt

Not using

del "%userprofile%\desktop\test.txt" OR

del "%userprofile%\..\Rebelscum\desktop\test.txt

You may understand me what i want if you read the following thread

Thank you very much for any help you can provide me


:: Critical conditions for this script to run as intended:
:: - to be run by someone with administrator privileges.
:: Non-critical conditions for this script to run as intended:
:: - to be run on win7 or above ( timeout )
@echo off
set RenEngKeyPath=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
set $rnd=%random%%random%

:: reg add "%RenEngKeyPath%" /f /v "AllowProtectedRenames" /t REG_SZ /d 1 >nul
:: reg add "%RenEngKeyPath%" /f /v "PendingFileRenameOperations" /t REG_MULTI_SZ /d



timeout 1 >nul
:: shutdown /s /t 0
Avatar of Zoppo
Flag of Germany image

Hi rebelscum0000,

if there's no reason against I would suggest to use any existing tool which can do this, i.e. one from SysInternals:

Hope that helps,

Why do you want to play with
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
credui.dll and explorer.exe

i.e. rename or delete them? Can you give me a reason why one should delete these system files..  From your earlier question which is pending deletion which this is an duplicate only missing the echo line
echo inb4 OP is hip
timeout 1 >nul
:: shutdown /s /t 0

You have raised my suspicions as to whether or not you should be helped.

(Edit: "Echo" sanitized by Modulus_Twelve.)
Avatar of Claudio Herrera



I found this batch with this examples (In a few words I copied and pasted)
The goal is to delete index.dat files after restart my computer, not to delete these system files,


With PendMoves I cannot reach the path

C:\Documents and Settings\Rebelscum\Local Settings\Temporary Internet Files\Content.IE5\index.dat

Thanks in advance for understanding the situation

Avatar of Sudeep Sharma
Sudeep Sharma
Flag of India image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok let me try!!