This action cannot be completed because the file is open in another program . When you try to rename, delete, or move a file or folder, you might receive the message, “The action cannot be completed because the file is open in another program.” This guide describes several possible ways to resolve this problem. This problem occurred on windows server 2016. We want to know how to delete this folder and what programs let us not delete this folder?
Table of Contents
Fix This action cannot be completed because the file is open in another program
Great tool. Another great one is a free program called “unlocker.”
http://download.cnet.com/Unlocker/3000-2248_4-10493998.html
It runs in the background all the time and auto detects when you get the error message that a file is in use. It then gives you several options as to how you want to proceed. Great for deleting things that are being finicky or killing processes that have hung with files in use.
-
Open resource monitor
-
Open the CPU tab in the monitor
-
Select all processes (not sure if this is needed, you can probably just search for the handle)
-
Expand “associated handles”
-
Search for the file you need
-
Close the process that has the handle
the action cannot be completed because the file is open in another program windows 7, the action cannot be completed because the file is open in shell infrastructure host, folder or file open in another program, the action can’t be completed because the file is open in microsoft outlook, the action can’t be completed because the file is open in windows explorer, the action can’t be completed because the file is open in dhcp client, the action can’t be completed because the file is open in microsoft word, the action cannot be completed because the file is open in system iso
It is also possible to open in Windows Explorer the locked file and the processes files that lock it.
Windows Explorer Integration
File Unlocker is also integrated into the Windows Explorer. To use File Unlocker simply right-click a file or folder in the Windows Explorer and select “Unlock with File Unlocker” from the menu.
Selecting All Locked Files and Directories
To select and view information about all files and directories that are currently locked by the system press the “Select” button and choose the option “All Files and Directories”. Then a list of all the files and directories that are locked by the system is displayed.
Be careful because you can create havoc and cause irreversible damage with this function if you delete, rename or move files that you shouldn’t.
Make sure you select only specific files.
Refreshing Information
To refresh information about the processes that lock a file or directory press the “Find Locks” button.
Command line usage
The application has a user-friendly GUI interface but can also be easily executed from the command-line.
Unlocks files or directories that are locked from the Windows file system.
FreeFileUnlocker.exe [file|directory|input list file|/ALL] [/S][/D][/DPER][/DPROC] [/L] [/U] [/K] [/O [Log File]] [/V] [/SHOW] [/R filename] [/M file|directory] [/C file|directory] [/RL Rename List] [/ML Move List] [/CL Copy List] [/?]
file : file to get unlocked.
directory : directory to get unlocked.
input list file : text file containing a list of locked files or directories. one on each row. It is required to use the /L switch.
/ALL - ALL : Select all files or directories that are locked.
/S -S : Silent mode. Does not show GUI.
/D -D : Send locked files, or processes that lock those files, to the Recycle bin. Use /DPER with this switch to delete permenantly.
/DPER -DPER : Use with the /D switch to delete permenantly locked files or processes that lock those files.
/DPROC -DROC : Send to the Recycle Bin processes that lock specified files. Use with the /DPER switch to delete process files permenantly.
/L -L : Use input list file.
/U -U : Force unlock.
/K -K : Kill process.
Log File : file where to log output.
/O -O : log output to defined log file or to log.txt.
/V - V : Verbose mode. Write output messages to console.
/SHOW - SHOW : Show information about locked files or directories.
/R -R : Rename locked file or directory to the filename or directory name specified.
/C -C : Copy locked file or directory to the file or directory specified.
/M -M : Move locked file or directory to the file or directory specified.
Rename List : text file containing a list of entries that define how the files in the input list file will be renamed. Required the /RL and the /L switch.
/RL -RL : Rename locked files or directories of the input list file using the rename list.
Move List : text file containing a list of entries that define how where the files in the input list file will be moved. Required the /ML and the /L switch.
/ML -ML : Move locked files or directories of the input list file using the move list.
Copy List : text file containing a list of entries that define how where the files in the input list file will be copied to. Required the /CL and the /L switch.
/CL -CL : Copy locked files or directories of the input list file using the copy list.
For example to unlock file c:\documents\virus.exe execute the following :
FreeFileUnlocker.exe "c:\documents\virus.exe" /u /s
To show a list with all files and folders that are locked, execute the following :
FreeFileUnlocker.exe /all /show /s
For example, to delete permanently the malware file c:\documents\virus.exe execute the following :
FreeFileUnlocker.exe "c:\documents\virus.exe" /d /dper /s
For example, to unlock the file “c:\temp\osd.tmp” and kill the process that is using it, execute the following :
FreeFileUnlocker.exe "c:\temp\osd.tmp" /u /k /s
For example, to unlock the files that are contained in the list file c:\documents\list.txt (one file on each row) use the following :
FreeFileUnlocker.exe "c:\documents\list.txt" /l /u /s
For example, to unlock the files that are contained in the ist fie c:\documents\list.txt and move them to the destinations that are entered in the list file c:\documents\move.txt, execute the following :
FreeFileUnlocker.exe "c:\documents\list.txt" /l /ml "c:\documents\move.txt"