Questions tagged [delete-file]

Tag for questions regarding file deletion. O.S. independent.

2105 questions
0
votes
2 answers

Batch file to delete folder if it contains specific file

I'm trying to create batch file that will do the following: It will scan through all subfolders in specific directory for specific file. If it finds file within subfolder, all contents of this subfolder and subfolder itself will be deleted. For…
Kevkos
  • 1
  • 2
0
votes
1 answer

Deleting files in a folder Python 3.4

I have created a python 3.4 script to delete files in a foler(Temp files o fWindows Folder) Here it is but it is not working import os, subprocess del_dir = r'C:\Users\vaibhav2\AppData\Local\Temp' pObj = subprocess.Popen('del /S /Q /F %s\\*.*' %…
nothing1
  • 23
  • 5
0
votes
1 answer

java File.delete() dosent work for rename file

why this code dont work correct? file a.txt is create on hard disk and then a.txt rename to b.txt but b.txt will not delete. import java.io.File; public class Main { public static void main(String[] args) { File f=new File("a.txt"); …
0
votes
1 answer

VBA - Delete all workbooks but the active, then close (and do not save) the active one

i need to find a way to delete all the excel workbooks but the active one after some condition is fulfilled. I am new to VBA, so it is possible that I got here some very basic problem (but I couldn't find similar question here on SO). Here's my…
0
votes
1 answer

How to I delete from all Sub Directories apart from a select few

I would like to create 1 batch file that deletes a type of file (i.e. ".bak") with different date ranges situated in different sub folders that are in the same patent folder, but I can list the minority of folders. I have managed to create a FOR…
Adam Lacey
  • 103
  • 1
  • 11
0
votes
1 answer

delete selected image from grid view SD card

I created an imageviewer app. Its working fine but when I select a gridview item to delete it, it stops working. On selecting the item, delete button appears . On clicking the delete button ,an alert dialog appears asking for confirmation.I want the…
0
votes
2 answers

PHP - unlink('file_name') not working

I have issues while trying to delete files in PHP, using unlink('filename'). I have tried with a complexe file and it didn't worked. I've been using relative paths as adviced on other post about this. So i've made the simpliest script possible :…
B.T
  • 521
  • 1
  • 7
  • 26
0
votes
0 answers

Batch file to delete matching filenames

I am new to writing windows batch code. I am trying to remove files from a folder that are older than 3 days old but are checked before deleting to make sure it deletes all matching files. For…
0
votes
3 answers

.NET Delete actual files from listbox

This code is intended to delete the actual files from the system when it is selected from the system: Dim file As String() file = System.IO.Directory.GetFiles("C:\Users\User\Desktop", "lalala.txt", IO.SearchOption.AllDirectories) If…
Tim
  • 29
  • 1
  • 7
0
votes
1 answer

Delete before shut down! c# android

I want to delete all file in camera folder of my internal smartphone's storage before it goes off! How can i do? namespace App1 { [Activity(Label = "App1", MainLauncher = true, Icon = "@drawable/icon")] public class MainActivity :…
0
votes
2 answers

Deleting file in Laravel 5.5

I'm using Laravel 5.5 and I'm trying to delete a file stored in my storage/app/public directory. I'm trying to retrieve the file path from database and delete it, but it's not working. $file = Blog::where('id',…
Ali Jouadi
  • 133
  • 1
  • 2
  • 15
0
votes
1 answer

Delete files in a folder but keep the last generated file

I need to delete files in an specific folder with a batch script, however, I need to keep the last file generated. Our server has an IIS folder that keeps generating logs, and we need to keep always the last one, but delete the older ones. Currently…
Fabián Cerda
  • 21
  • 1
  • 1
  • 2
0
votes
0 answers

File Delete, it's being used by another process

private void btn_Olustur_Click(object sender, EventArgs e) //dosya oluştur click { string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\yenidosya.txt"; StreamWriter dosya =…
user8131531
0
votes
0 answers

Autodesk Fusion 360 - File "in use by ..." error

I am trying to delete a file from an Autodesk A360 project, and I keep getting an error saying that the file is in use. It shows a red dot under the thumbnail, along with the text "In use by Matthew Matthew". Matthew Matthew is my username, but I am…
Matthew
  • 111
  • 5
0
votes
1 answer

is there a way to delete a file after some operations done in u-sql script?

I want to delete some files in the Azure Data Lake Store after some operations(Extraction Method) done using the U-SQL script. Is there any way to delete files using functions or any other way in U-SQL? I know that U-SQL can be used to only read…
Arron
  • 1,134
  • 2
  • 13
  • 32