Tag for questions regarding file deletion. O.S. independent.
Questions tagged [delete-file]
2105 questions
0
votes
0 answers
utl_file.fremove erros out when Oracle Grants are present for user (Linux)
I have created oracle directory (SIMPLEDIR) and it points to a physical location on the disk. Oracle version is 12C.
The user has 'CREATE ANY DIRECTORY' and 'DROP ANY DIRECTORY' grants as confirmed by using query
SELECT 'DIR' gtype,…

Artha Wijendra
- 171
- 2
- 14
0
votes
1 answer
How to implement the cancellation of the process of deleting folders, files from a PC with restoring deleted information in C#?
I'm trying to make my own Mini File Manager in Windows Forms for learning purposes.
Can anyone please tell me how to implement the cancellation of the process of deleting folders, files from a PC with restoring deleted information in C#? (the…
0
votes
1 answer
Issue with file path when deleting file in Python
Trying to write a small script in Python to delete files, but the os.remove function is having issues with the file path. Note if I comment out os.remove("C:\\Users\The User\Downloads\test.txt") it runs fine and will print 'gone'. I don't understand…

WeVie
- 568
- 2
- 9
- 25
0
votes
0 answers
C# Cannot Delete File Because It's Being Used
I'm currently trying to make a work tracker in C#, and I want to have it where it temporarily creates a file that saves screenshots of the screen's activity, then converts those screenshots into a video, and then deletes all of the screenshots. So…

TermSpar
- 401
- 3
- 13
0
votes
4 answers
Delete a folder named ~ in unix
Under my home directory I see a directory named ~. I guess I must have accidentally copied my home directory somehow.
Anyway, it's eaten up all my space and I'd like to remove it but obviously just running rm -r ~ will delete the entire contents of…

dan
- 6,048
- 10
- 57
- 125
0
votes
2 answers
File deletion in Java
Every 5 minutes in a thread I create new files and store them into a folder.
Every day at 11:10 A.M., I have to delete the old files. However, one condition is that to be deleted a file must have been created before this 11:00 A.M. Files created…

Sri
- 669
- 2
- 13
- 25
0
votes
1 answer
exe File not released after AES Java encryption
I have a function that encrypts files using AES 256 ( Java lib ) and then delete by writing over the file.
For some reason it does not work for .exe files. The file gets encrypted by the delete cannot be performed "Access Denied". I am guessing…

ITS
- 1
0
votes
2 answers
Delete the file before deleting the row data?
I wanna delete the file from the uploads folder before deleting the row data from the database. I used the below code but its giving the error.
Error=> No such file or directory
function deleteItem($conn,$product_id)
{
…

Soonang Rai
- 41
- 1
- 8
0
votes
2 answers
Batch file that deletes itself and folder that contains it
I'm trying to do the following but deleting the downloaded folder which contains the batch file fails:
NOTE: All exe's, apps, batch file etc. are contained in file.zip.
User downloads file.zip to any directory and unzips.
User runs an exe which is…

Jeff
- 495
- 1
- 5
- 18
0
votes
1 answer
folder/file deletion not working when first connected to derby
UPDATE: it looks like system.exit(0) is unlocking the file and allows the second code example to work. How can I unlock the file without calling system.exit()?
I have two code examples. The first creates a database, closes the connection and then…

DCR
- 14,737
- 12
- 52
- 115
0
votes
0 answers
Python - Deleting sub-folder (Delete only sub-folder and not the other files)
I have a folder that contains a sub-folder and set of text files. I am trying to delete the sub-folder using the below code
Path = '/Desktop/foldername/'
folder = 'Path/'
for the_file in os.listdir(folder):
file_path = os.path.join(folder,…

Kevin Nash
- 1,511
- 3
- 18
- 37
0
votes
0 answers
T-SQL is deleting backup file immediately after creating it
I created a script in PHP / PDO that executes a line of SQL to make a file backup of various databases. The list of database names and the datestamp with which to select the folder into which to place the file are passed as HTTP REQUEST array…

Michelle
- 57
- 1
- 7
0
votes
0 answers
Qpython3 file deletion
So I've made a script that would delete files with a specific file extension, but how would I go about adding secure deletion of the file?
import sys
import os
from os import listdir
dir_name = "storage/emulated/0/Download/"
test =…
0
votes
1 answer
Windows, cannot delete files immediately after service delete
I delete a windows service with a sc.exe delete .
Immediately after that, I delete the files owned by the service (an exe and a couple of dlls) and I cannot because these files are still locked.
I've found out that it works if I execute…

marco
- 1,686
- 1
- 25
- 33
0
votes
2 answers
remove files in directory and print the deleted files name
I want to remove files in directory except a specific file and print a message if files remove.
find . ! -name 'name' -type f -exec echo 'removed files:' rm -v -f {} +
When I run this command it prints:
removed files: rm -v -f ./aaavl ./aaavlpo
I…

F.M
- 463
- 2
- 7
- 20