2
votes
1answer
29 views

Bulk-deleting inbox mails managed by POSTFIX

Had an issue several hours ago with a client mail account, which got compromised. As a result, he had hundreds of thousands of spam queued in postfix, which lead to several issues. Everything's fixed ...
0
votes
1answer
24 views

Find and delete line in .htaccess file

I am trying to figure out how could possible a command do search and delete line from .htaccess file . the following line is the line i want to search and delete RedirectMatch ...
0
votes
4answers
120 views

Unable to delete a file, shows path not found error

Due to some malware attack a file named com7.ini.asp got created in my folder and it is hidden when I browse it through Windows. I tried the following: I gave the whole path in the address bar and ...
2
votes
1answer
240 views

Recursively delete all .exe files with the same name as the containing folder

I want to delete all .exe files in the current folder and all the sub-folders. I read that find . -name "*.exe" -exec rm -f '{}' \; will do, but I want to do the delete only if the container folder ...
1
vote
2answers
134 views

rm -r: exclude certain subdirectories

The problem I have a directory structure, e. g. something like this (here trailing slashes represent folders): ./A ./B/A/A ./B/A/B ./B/B/ ./B/C ./C/ And I need to recursively remove everything ...
1
vote
0answers
23 views

Deleting *.htm files also deleted *.html files [duplicate]

What is going on here?? Bunch of *.html and *.htm files in my directory, I do a del *.htm and after that the *.html files are also gone: I noticed it happening in Total Commander when I typed the ...
0
votes
1answer
203 views

How to create batch file that delete files by words at the end of file name (using a list of words)?

I have a directory with thousands of html files scattered across several subdirectories. I need to delete all files matching any one of many criteria. All criteria are similar by kind. The file names ...
0
votes
2answers
760 views

Batch command to delete files from file list [duplicate]

This code works fine. it deletes files from a file list: For /f %%a in (file.lst) do del %%a But why is the below one not working? It deletes the .lst file itself: if exist file.lst ( set ...
1
vote
0answers
71 views

Delete a directory off the server

I am trying to delete a folder on my server (Windows Server 2003), but the folder has a file in it that I cannot manage to delete. I used command del /f desktop.ini and get an access denied response. ...
2
votes
2answers
803 views

bash home/end/delete key inserting tilde, or if preceded by escape key, [1~ [3~

bash home/end/delete key inserting tilde, or if preceded by escape key, [1~ say I type echo hellp, move cursor to hel|lp and type delete, and bam, i got ~tilde say I type echo hellp, move cursor to ...
2
votes
3answers
879 views

Delete set of files using find command

Background Delete a set of files, scattered across different directories. Problem The following code does not work (the unescaped | causes issues); for %i in (dir /s/b | find "lock") do echo del ...
0
votes
1answer
220 views

Delete or rename more than one file with a single command in Windows CMD?

Is it possible to specify more than one file name or mask for deletion with the DEL command in CMD? Something like this... del /p *.html & *.json This command works only partially - it finds ...
1
vote
2answers
3k views

How can I undo an “RD /S /Q <path>” command prompt command?

I accidentally deleted an important folder I had on my Windows 7 desktop using the administrative command prompt command listed as: "RD /S /Q "C:\Users\Robby\Desktop\Pictures&Things" I ...
3
votes
2answers
1k views

How to mass remove symbolic links in Windows (amongs regular files that share similar name in many folders)?

Is there anyway to quickly remove many symbolic links in many folders that contains many other files. E.g some command in command prompt (be able to delete all slink created from day XX for example)? ...
21
votes
2answers
550 views

DEL *1.* deletes all files in folder

I'm trying to delete all files that end with the number one, but for some reason it is deleting all of the files in the folder. The command I'm using is DEL *1.* It works when I use a letter like ...
2
votes
3answers
2k views

Make a batch file find duplicate file names with different extensions, and actions on the results

What I want to do is have a batch file search folders, and subfolders, for matching file names that are ending in .mp3 and .wma and delete or move the *.wma duplicates. Below you'll find what I have ...
2
votes
2answers
3k views

Batch delete : Access is denied

As the title suggests, I'm having issues with the del command in a batch file. When it gets to the delete step I get the message "Access is denied". My batch command looks something like this. set ...
2
votes
1answer
225 views

How to remove a folder with a broken name?

I use Windows Live Mesh to keep my files backed up across many computers, but I have one folder (that I think came from a rar file), called px 2 (with what appears to be a space at the end). This file ...
2
votes
1answer
530 views

Deleting Multiple Files

I am deleting multiple files with the command: del /s *.doc *.rtf *.txt I get the error Could Not Find *.doc. How can I get the command to continue deleting RTF and TXT files when there are no ...
3
votes
2answers
2k views

Delete duplicate files with Windows batch file

I have a program that automatically copies files to a directory, and if it creates a duplicate it will name it like so: file with duplicate.xxx file with duplicate - 1.xxx file with duplicate - 2.xxx ...
11
votes
3answers
31k views

How do I delete directory trees via console on Windows 7?

I want to delete the whole content of a specified folder on Windows 7 via batch file. My problem is, that 'del' or 'erase' only deletes the files, not the folders and 'rmdir' or 'rd' Always deletes ...
5
votes
1answer
2k views

Two commands to move files to trash. What's the difference?

trash-cli provide a trash command, and gvfs-bin provides a gvfs-trash command that move files / directories to the trash can. Is there an important difference between these two commands?
2
votes
1answer
154 views

delete .mp3 files from player - have tried 'del d:\*.mp3' and 'chkdsk d:\ /f'

I bought a cheap .mp3 player from a guy, you know how it goes... Anyway, I tried to delete the .mp3 files from the player through the Windows folder. I kept getting an error - something about ...
2
votes
2answers
5k views

How to delete files and subdirectories from folder but not that folder itself?

What commands can I use (from the command prompt) to delete all files and all subdirectories from a folder, but not delete the folder itself? Basically at the end of the delete, there should be an ...
1
vote
1answer
2k views

How to delete a folder and its sub folders? rm -R not working

I am trying to delete a folder that has sub folders, and a git repository. Doing: rm -R folder_name/ doesn't work, it prompts me for some folders that are GIT specific?
6
votes
5answers
14k views

How can I delete all files/subfolders in a given folder via the command prompt?

I would like to delete all files and subfolders in a batch file in Windows 7 and keep the top folder. Basically emptying the folder. What's the command line instruction for that?
3
votes
2answers
683 views

Delete Directories smaller than x

How can I delete Directories which are smaller than, say, 1000 KB? I already have a file list from the command: du -sk * | sort -n > sort.txt but I don't know how to proceed. ++++++++ ...
3
votes
4answers
860 views

Delete subdirectories in Windows

Is there a way to delete all subdirectories named .svn from all levels of a directory tree, without touching anything else? rd/s and del/s don't seem to do it.
2
votes
1answer
1k views

Delete files recursively matching a name on the command line (OS X)

Just recently I tried out a backup utility, and wanted to back up the local copies I have of some websites on my MacBook (OS X) Unfortunately, the utility left two files in every directory it backed ...
2
votes
2answers
4k views

How do I delete files greater than a certain date on linux

Occasionally I extract an an archive into the wrong folder and would like to move or delete the newly extracted files. What is the easiest way to do this via the command line? Can I somehow search ...
26
votes
6answers
46k views

Recursively delete empty directories in Windows

I have a directory on my Windows 7 machine that has hundreds if not thousands of sub-directories. Some of them have files, some do not. I want to delete all the empty directories. Looking at the ...
4
votes
4answers
3k views

Deleting all files that do not match a certain pattern - Windows command line

Deleting items via the command-line is pretty easy. del /options filename.extension Now, suppose I want to delete all files which do not end with .jpg in a folder, how would I do that. The thing ...
20
votes
4answers
6k views

What is the command line way of sending files to the recycle bin?

Is there a command line program that can send files to the recycle bin? This is on XP and Vista.