Tag for questions regarding file deletion. O.S. independent.
Questions tagged [delete-file]
2105 questions
0
votes
1 answer
Batch file to split text file into multiple files in same directory on Win Svr 2012 using NO 3rd Party Apps
I am hoping the wonderful experts here can assist me with my problem. I have found this site extremely useful in the past in solving other issues I have had but I have searched this site and tried all the answers similar to my problem but cant seem…

Bearwires
- 23
- 1
- 3
0
votes
1 answer
Windows Mobile - Secure Device Wiping
I need to provide secure wiping function in windows mobile with following details:
All files on device should be encrypted with a strong key (done).
User should not be able to view files in explorer.
Device should not show used disk space for…

Let me Ask
- 1,029
- 1
- 8
- 33
0
votes
0 answers
Errors on System.IO.FileStream CSV file creation and System.IO.File.Delete
In an old VB.NET code (VS 2008) I use this code:
If System.IO.File.Exists(sFilePath) Then
System.IO.File.Delete(sFilePath)
End If
Dim Fs As New System.IO.FileStream(sFilePath, System.IO.FileMode.CreateNew,…
0
votes
0 answers
Will this code be able to shred (securely delete) a file?
I am trying to create a simple file shredder with windows batch-file.
So far, I've written the following:
set "Target=File.txt"
for /f "tokens=*" %%f in ("%Target%") do (
fsutil file setzerodata offset=0 length=%%~zf "%%f" >nul
ren "%%f"…

A Cat Named Tiger
- 373
- 3
- 10
0
votes
1 answer
How to know who is deleting the files/directory
We have a directory /home/test/abc
Sometimes we found that the directory is not present. Most probably it is deleted by someone. We have lots of users who log in and out from the system.
I have checked the bash_history of all the users but nobody…

user3198755
- 477
- 2
- 10
- 21
0
votes
1 answer
How to delete all files (in a directory) whose name starts with certain string?
I want to delete all files that contain
10.
And once I specify the directory, I hope it delete all such files in all subfolders of that directory.
I think I need to use something like
del /s
But I don't know what regex I need…

user42459
- 883
- 3
- 12
- 29
0
votes
2 answers
Delete a .txt file after it's closed?
I want to delete a file after it's been closed.
Example:
$content | Out-File info.txt
Invoke-Item info.txt
This opens the file info.txt with the content of $content.
Now all I want to do is, when this file is closed, delete it.
Any idea how to do…

Rakha
- 1,874
- 3
- 26
- 60
0
votes
1 answer
laravel 5.2 delete file button
I have a Laravel 5.2 website with multiple file uploads. I have a file delete button that is not working. User is just redirected back to the page but the file is still there.
show.blade
0
votes
2 answers
IO.File.Delete Random UnauthorizedAccessException
I'm using My.Computer.Filesystem.WriteAllBytes to write out an executable stored in my application's resources to it's startup directory. After running the executable, I then delete it. Everything works fine; however, I'll randomly get an…

Steven
- 261
- 3
- 4
- 14
0
votes
2 answers
What is better way to delete file with condition
I want to build a win service(no UI) on c# that all what it done is: run on list of directories and delete files that over then X kb.
I want the better performance,
what is the better way to do this?
there is no pure async function for delete file…

FADI1987
- 2,377
- 2
- 9
- 5
0
votes
1 answer
Deleting a folder using VBA and it still appears in File Explorer until the next iteration
VBA - Access
I'm using fso.DeleteFolder to delete a folder on a server that an earlier function in the same Access DB created. The fso.DeleteFolder code runs without error and running fso.FolderExists after shows the folder no longer exists (prior…

Scotty B
- 3
- 5
0
votes
0 answers
RCurl cannot delete file via ftp
I am using RCurl and am having big trouble trying to delete a file (filename.txt) on an ftp account (username:password) on the ftp server ftp://ftp.foo.bar.
I simply cannot make it work, for example I…

Erwin
- 1
0
votes
2 answers
C# Deleting File "A first chance exception of type 'System.IO.IOException' occurred in mscorlib.dll"
I'm trying to add a picture of part of a form to a PDF so I'm using PDFsharp, but one of the problems I have is that I can't delete the picture after I have added it to the PDF file.
This is the code I'm using:
private void button12_Click(object…

Drago87
- 105
- 1
- 11
0
votes
1 answer
How to block a directory for not moving/deleting while my program uses the directory?
I was working on a project in visual studio, in my project i need to create some files and folders for backup, but if someone accidentally delete or moved those files or folders that my project/software is using while running then it will shutdown…

jimmy
- 117
- 1
- 7
0
votes
1 answer
Backand deleteFile response ok but not actually deleting file (angular2)
Hi so my issue is that I am uploading images fine to backand, I can view them in my app, see them on the server.
The problem comes when I try to delete the file, I am double checking that the name matches exact e.g. myimagetodelete.jpg
Here is the…

C.K Munn
- 133
- 12