One of our readers recently asked a question with regards to deleting files and folders recursively using the command prompt.
I would like to delete all the folders and files in a folder. Like we have an option to delete all the files is "del *" but it will not work for deleting folders like "rmdir *"
The question is similar to a one asked to us earlier where a user wanted to know how to recursively delete certain file types from directories and sub directories using the command prompt.
However when it comes to deleting directories and subdirectories using the command prompt, the regular rmdirdoes not work with a wildcard.
In order to delete all files and folders recursively using the command prompt you will need to run the command;
rmdir /S directoryname
Replace directorynamewith the directory you want to delete.
Once you run the command you will be prompted whether you want to delete the files or not, if you do not want to see this prompt you can pass the /Q switch to the command, which will then run the command in non-verbose mode.
However you must note that files and folders deleted from the command prompt do not go to recycle bin, they are permanently deleted, so make sure that you really want to delete those files, however if you do delete those files accidentally you can use one of the free software to recover deleted files.
Every software these days focus on having tabs to help you easily manage multiple files or browsing session in a single instance, the tab functionality though it restricted to browsers, PDF file viewers, text editors etc.
For applications such as command prompt and cygwin, there are very less alternatives for tabbed interface, being a programmer I prefer using tabs since it eases managing multiple sessions / windows and adds to my productivity while dealing with CLI interfaces.
Related: Tabbed Interface for Putty
Continue reading Tabbed Interface for Command Prompt and Cygwin with Console
One of our readers asked us a real interesting question, which we really loved to solve. The question was tricky but the solution was real simple.
The question asked to us was;
Do you know if there’s a way to delete files of a particular filetype from a set of folders quickly in Windows?
For example, I’ve got a folder by the name “ABC” and I’ve got some pictures and music files there, and I need a tool that automatically deletes all those pictures (i.e., files of a particular format like JPEG) quickly from the ABC folder and its sub-folders.
Continue reading Recursively Delete Files in Folders and Sub Folders Using Command Prompt
We have been big fans of Command Line tools, in the past we have talked about a command line tool to CLI,command prompt,commands,windows dos commands,disksum,find largest files,largest file command prompt,tips and tricks