delete-file Questions

3

I am trying to delete a SQLite database file from my C# application. The same application performs multiple RW queries to the DB by creating and disposing a new connection each time. When trying to...
Fraction asked 19/1, 2023 at 12:51

4

I was working with discord.js last night and I ran a few commands in the terminal. The last command I wrote caused the name of the file at the top of the screen to be crossed out and turn red and I...
Palocz asked 23/1, 2022 at 10:5

3

Solved

Following line recursively deletes only HIDDEN files with .mta extension del /S /A:H <folder_name> *.mta What I want to do is, to delete both: hidden and normal files with .mta extension. ...
Pronunciation asked 11/12, 2011 at 12:1

4

How do I delete all png format pics in a folder using Python 3?
Confiding asked 28/6, 2013 at 6:41

15

How do I delete files or folders recursively on Windows from the command line? I have found this solution where path we drive on the command line and run this command. I have given an example wit...
Liva asked 5/10, 2012 at 14:51

25

The below code only deletes the first file it gets inside the web dir. I want to remove all the files and folders inside the web directory and retain the web directory. How can I do that? - name: r...
Chandlery asked 5/7, 2016 at 10:12

18

Solved

How can I delete a file or folder in Python?
Roadster asked 9/8, 2011 at 13:5

5

Solved

I have the following code to delete a file: from django.db import models from django import forms import os class Document(models.Model): docfile = models.FileField(upload_to='documents/%Y/%m/%...
Moorland asked 15/7, 2013 at 20:57

19

Solved

What is the BEST way to clear out all the __pycache__ folders and .pyc/.pyo files from a python3 project. I have seen multiple users suggest the pyclean script bundled with Debian, but this does no...
Etem asked 11/3, 2015 at 15:39

7

Solved

I have a website project that has more than 50,000 unimportant files (to development) in some directories. /website.com/files/1.txt /website.com/files/2.txt /website.com/files/3.txt /website.com/f...
Dunkin asked 27/4, 2010 at 2:35

2

Solved

Delete files older than 3 months how? For 90 days i know: find /tmp/*.log -mtime +90 -type f -delete But how do i know 3 months equal to always 90 days? how many exact days? Is there more bette...
Whereas asked 23/8, 2017 at 11:19

9

Solved

I need to delete files in Amazon S3 which are older than seven days. I needed a shell script to do this, but I didn't have any luck with google search. I found the below URL: http://shout.setfive.c...
Donavon asked 22/5, 2018 at 12:27

5

Solved

I used the below command to delete files older than a year. find /path/* -mtime +365 -exec rm -rf {} \; But now I want to delete all files whose modified time is older than 01 Jan 2014. How do I ...
Hijoung asked 12/10, 2015 at 22:8

4

Solved

I have uploaded a font file that I don't have the rights to distribute to git hub several updates ago. I have a relatively inactive repository and I have the ability to notify all of my members if ...
Jaeger asked 31/1, 2016 at 15:31

15

Solved

I want to remove a file from my repository. git rm file_to_remove.txt will remove the file from the repository, but it will also remove the file from the local file system. How do I remove this fi...
Buitenzorg asked 17/7, 2009 at 14:56

5

The only way I came up for deleting a file from a zipfile was to create a temporary zipfile without the file to be deleted and then rename it to the original filename. In python 2.4 the ZipInfo cl...
Algicide asked 4/2, 2009 at 23:0

3

To delete all docker containers: docker stop $(docker ps -a -q) docker rm $(docker ps -a -q) Or this too deletes all docker containers: docker ps -q -a | xargs docker rm To delete images that...
Ecstatics asked 18/4, 2017 at 1:13

3

Solved

How can I check that I can delete a file in Java? For example, I should be able to delete file C:/file.txt but I never will be able to delete the C:/ or Computer, or My Documents etc. Solution de...
Lewes asked 14/5, 2013 at 9:13

4

Solved

I'm actually trying to use CURL to make some operations on a ftp server in C++ with Visual Studio. I've no trouble to do some uploads or downloads with commande line tools. But for deleting some f...
Getraer asked 25/2, 2015 at 14:25

3

Solved

Unable to remove .git I have a git repository, Rift, that I am trying to remove. On attempting to run rm -rf, I get the error: rm: cannot remove 'Rift/.git/objects/pack': Directory not empty. When ...
Dipetalous asked 16/11, 2020 at 3:40

3

With boto3, one can delete files in a bucket as below for object in bucket.objects.all(): if 'xyz' in object.key: object.delete() This sends one REST API call per file. If you have a large num...
Coriolanus asked 29/12, 2017 at 16:15

7

How do I write a Google Apps Script that deletes files? This finds files: var ExistingFiles = DocsList.find(fileName); But DocsList.deleteFile does not exist to delete a file. Is there a way t...
Rattle asked 9/1, 2013 at 16:1

7

Solved

I have been using a specific piece of code to delete files from a folder but it is proving very problematic because maybe I forgot to close an InputStream or two. The code I have is so big that I a...
Railroad asked 12/7, 2012 at 7:46

7

I have the following structure: Dir 1 |___Dir 2 |___file 1 |___file 2... Dir 3 |___Dir 4 |___file 3... I would like to be able to find each file recursively, process the file in my own way, o...
Wasserman asked 24/2, 2014 at 23:15

8

Solved

I did: git init git add . git rm -rf dirname Looking at other answsers, git reset --hard HEAD, git checkout -f and git reflog did not work, apparently because there is no HEAD to go back to, nor...
Pomander asked 10/3, 2012 at 5:14

© 2022 - 2025 — McMap. All rights reserved.