Questions tagged [locked-files]
64 questions
124
votes
32 answers
Error: Cannot access file bin/Debug/... because it is being used by another process
When I debug my project, I get following error:
"Unable to copy file "obj\Debug\My Dream.exe" to "bin\Debug\My Dream.exe". The process cannot access the file 'bin\Debug\My Dream.exe' because it is being used by another process."
Using Process…

Trần Minh
- 1,633
- 4
- 15
- 17
27
votes
5 answers
SMTP Send is locking up my files - c#
I have a function thats sending messages ( a lot of them) and their attachments.
It basically loops through a directory structure and creates emails from a file structure for example
c:\emails\message01
\attachments
…

JL.
- 78,954
- 126
- 311
- 459
16
votes
6 answers
File locked after sending it as attachment
I am sending a file as an attachment:
// Create the file attachment for this e-mail message.
Attachment data = new Attachment(filePath, MediaTypeNames.Application.Octet);
// Add time stamp information for the…

JMon
- 3,387
- 16
- 63
- 102
13
votes
15 answers
Could not delete /.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/appname/WEB-INF/lib. May be locked by another process
I am trying to run an web app. In the beginning it was going well, but I had to delete some jars from the project folder. I didn't delete the jars using eclipse. So, I started to get these errors:
Publishing failed with multiple errors
Could not…

Murilo
- 4,453
- 5
- 19
- 28
13
votes
2 answers
Is there a way to handle locked file from command line and release it?
Is there a way to detect locked files in specify folder and release them by command line?
Something like this in pseudo-code:
for file in folder do
unlock file

David Michaeli
- 777
- 4
- 11
- 22
12
votes
10 answers
File is locked by Visual Studio 2019
I have a weird problem in Visual Studio:
if an unhandled exception is thrown during the debugging process I'm not able to build my
C# application:
Unable to copy file "C:\Projects\A\bin\A.dll" to "..\..\bin\A.dll".
The process cannot access the…

leon22
- 5,280
- 19
- 62
- 100
6
votes
1 answer
How do I unlock locked files and folders (mac) with Python
As a "clean up" after my script's main purpose is complete, a function is called to recursively look through each folder and remove all files that end in a pre-determined set of extensions.
I during my testing, I discovered that some files with a…

ProGrammer
- 976
- 2
- 10
- 27
4
votes
1 answer
how to copy files in use with robocopy?
I am having a batch file performing some backup operations.
The backup operations look like this:
robocopy %source% %root%\%targetname% /MIR /R:0 /W:0 /NFL /NDL /NJS
Unfortunatly some files in use cannot be copied due to windows "protection".
Is…

Steven
- 61
- 1
- 3
- 10
3
votes
2 answers
The file “project.pbxproj” could not be unlocked in Xcode 8.3.3
Due to some reason some of files were locked in xcode, which i resolved through the this solution.
but even after that i keep getting this error
****The file “project.pbxproj” could not be unlocked.**
Could not add write permission to the file…

shahtaj khalid
- 476
- 7
- 24
3
votes
0 answers
Shared folder is locked Dropbox
I'm using Dropbox and I've just tried to share folder with my PHPStorm project to another team mate by Invite to folder option. And after them PHPStorm writes me this: Could not save project!: Unable to save project files. Please ensure project…

sczdavos
- 2,035
- 11
- 37
- 71
3
votes
3 answers
Directory is locked after creation of file while program is running
After I created a file in a directory the directory is locked as long as my program which created the file is running. Is there any way to release the lock? I need to rename the directory couple of lines later and I always get an IOException saying…

theknut
- 2,533
- 5
- 26
- 41
2
votes
2 answers
PHP Accessing a file that has been locked for editing - Permission Denied error
I'm doing some csv parsing, and if I cancel the parsing (by navigating to a different page or refreshing) before the fclose() function gets called, I get the below error when I go back and start up the program again:
Warning: unlink(spreadsheet.csv)…

user954912
- 243
- 1
- 5
- 12
2
votes
4 answers
File is locked after HttpPostedFile SaveAs(LocationOnServer)
I have an aspx webpage that uses as handler to save uploaded files via swfupload I am saving the file on the server like this:
HttpPostedFile uploadedFile = Request.Files["Filedata"];
uploadedFile.SaveAs(LocationOnServer);
the problem is that after…

kleinohad
- 5,800
- 2
- 26
- 34
2
votes
1 answer
Copying open files in Power shell
i am new to PowerShell and i have managed to google my way to getting the following PowerShell Script together:
#System Variable for backup Procedure
$date = Get-Date -Format d.MMMM.yyyy
New-PSDrive -Name "Backup" -PSProvider Filesystem -Root…

James Clegg
- 21
- 3
2
votes
3 answers
how to copy locked files ( Device or resource busy error) on windows xp without admin permissions
Is there is any way I can copy locked files on windows xp machine without having admin rights?
I used unloker tool its great but needs admin rights to install and run.
how it could be done in some programming language like perl/shell/c c++ etc.
or…

Hemant
- 3,893
- 6
- 27
- 22