delete-file

Windows 2008 R2 - Kernel (System Process PID=4) is locking files and folders

这一生的挚爱 提交于 2019-12-28 03:35:10
问题 Windows 2008 R2 - Kernel (System Process PID=4) is locking files and folders for a long time. For example when deleting a file, the file may remain locked for 1 minute or more and only after that be deleted. On another occasions I encountered files or folders I could not delete. ProcMon showed that the System Process was holding a handle to those resources for a couple of minutes and then released them None of the resources I mentioned were system resources, only files and folders installed

The process cannot access the file xxxxxx because it is being used by another process

守給你的承諾、 提交于 2019-12-25 16:53:27
问题 I am writing a WinForm application using VS2010 & VS2012 with .Net4. In the application I load individual images into pictureboxes and then delete those images the user does not wish to keep. Every time I try to delete these "unwanted" images I get the above error message: "The process cannot access the file xxxxxx because it is being used by another process" The following is used to load an image into a dynamically created picturebox together with the code to delete the unwanted images.

fs.DeleteFile(var) not deleting file

夙愿已清 提交于 2019-12-25 08:48:26
问题 On a few of our sites we are running a backup script that saves a MSSQL database as a .bak file in a that directory. Every day we run a Git style backup so that we have any changes to the site. Due to variance in backup timing We don't really want to delete today's backup, or yesterday's, so we will delete 3 days past. The following .asp page runs fine if the DeleteFile(line 30) is commented out. if the file exists it follows the correct branch, so it can see the file, but if the delete line

How to save only zip files and remove other folders using java?

﹥>﹥吖頭↗ 提交于 2019-12-25 06:39:26
问题 Here i have Folder(Books)in that i have 3 sub folders named: sub1, sub2, sub3 and sub1 have 2 files , sub2 have 3 files , sub3 have 4 files . And sub1.zip , sub2.zip and sub3.zip . I want to keep only zip files and delete sub1, sub2, sub3 folders of Books. With my code I'm able to delete all inside files of sub1 folder, sub2, sub3 finally all folders becoming empty, then how can I delete sub1,sub2 and sub3 folders . public void SaveZipFiles(File destwithouAudio) throws IOException { File[]

How to using the Aptana Studio 3 move file to trash when delete or clean file?

南笙酒味 提交于 2019-12-25 03:56:29
问题 Is it possible for Aptana to offer a "Move file to trash" option instead of deleting the file directly? I've often accidentally deleted files. 回答1: It sounds as if that feature won't/can't be implemented in Eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=70810 However, they do mention using local history for the same thing: "If you have deleted a file in the Navigator, simply right click on the parent folder and select 'Restore from Local History'." 来源: https://stackoverflow.com

How to programmatically detect deleted files?

╄→尐↘猪︶ㄣ 提交于 2019-12-24 21:28:57
问题 In Team Foundation, you can ask Team Explorer to show deleted files by doing this: Tools > Options > Source Control > Visual Team Foundation Server > Show deleted items in the Source Control Explorer. My question is how do you do the same thing programmatically? I am developing a synchronisation tool, and I need to detected deleted files in TFS. Workspace.Get(...) returns only non-deleted files. Any idea how I can achieve that? 回答1: Go to the Visual Studio folder in your start menu and start

How to programmatically detect deleted files?

荒凉一梦 提交于 2019-12-24 21:13:16
问题 In Team Foundation, you can ask Team Explorer to show deleted files by doing this: Tools > Options > Source Control > Visual Team Foundation Server > Show deleted items in the Source Control Explorer. My question is how do you do the same thing programmatically? I am developing a synchronisation tool, and I need to detected deleted files in TFS. Workspace.Get(...) returns only non-deleted files. Any idea how I can achieve that? 回答1: Go to the Visual Studio folder in your start menu and start

Delete PDF files only from folder using Applescript on MAC

假如想象 提交于 2019-12-24 11:34:09
问题 I need to delete the PDF files only from a folder on a network drive. There are other file types in the folder I can not touch. I am assuming I have to choose or identify the PF files first and then move them to the trash or delete them. What I have so far: tell application "Finder" set theFolder to "Macintosh HD:Users:Kathlene:Desktop:ABC123_JOB" set destFolder to "Server/JOBS/TRANSFER_TRASH/" set thePDFs to every file of theFolder whose name extension is "pdf" move thePDFs to destFolder end

Recursive deletion causing a stack overflow error

泄露秘密 提交于 2019-12-24 10:48:41
问题 I asked a question about how to delete all files from folders in a directory but keep the folders, this can be found here: How to delete files of a directory but not the folders One of the purposed solutions was to use recursion, to achieve this: public void DeleteFiles() { File file = new File( "D:/Documents/NetBeansProjects/printing~subversion/fileupload/web/"+ "resources/pdf/"); System.out.println("Called deleteFiles"); if (file.isDirectory()) { for (File f : file.listFiles()) {

Android Deleting Files MediaScannerConnection

☆樱花仙子☆ 提交于 2019-12-24 10:29:41
问题 I'm trying to delete some files or directories from the internal memory (ASUS TF101) using the commands File.delete(). However, using the Android File explorer I can see how the files are removed, but using the Windows explorer they still show there. I solved a similar issue when adding files just creating a MediaScannerConection (and using the method scanFile). Does anyone know how to solve this problem? Of course it´s not acceptable to restart the device as the final user will not like this