Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Deleting all files from a folder and its subfolders

28 Dec 2013   #1
Lord of Rings

N/A
 
 
Deleting all files from a folder and its subfolders

Hello everybody,

Can you tell me how can I delete all files from a folder and its subfolders in windows 7. While deleting I don't want to delete subfolders, just files.

The second thing that is important: I don't want to do it manually, but automatically. All files at once. I have large folders with many subfolders, and it would take long if I performed the task manually.

Thanks for help,
LOR


My System SpecsSystem Spec
.
28 Dec 2013   #2
whs
Microsoft MVP

Vista, Windows7, Mint Mate, Zorin, Windows 8
 
 

My System SpecsSystem Spec
28 Dec 2013   #3
badger906

Windows 7 Ultimate x64, & Mac OS X 10.9.2
 
 

sometimes im too lazy to tell things in my own words sooo heres an easy guide
http://stackoverflow.com/questions/1...g-batch-script
My System SpecsSystem Spec
.

28 Dec 2013   #4
whs
Microsoft MVP

Vista, Windows7, Mint Mate, Zorin, Windows 8
 
 

Hmm, now we have the same link twice, LOL
My System SpecsSystem Spec
28 Dec 2013   #5
Lord of Rings

N/A
 
 

OK, thanks for trying to help. Is there a free utility that can show/delete all files in a folder and its subfolders? I am not very familiar with command prompt and batch scripts.

Thanks once again,
LOR
My System SpecsSystem Spec
28 Dec 2013   #6
whs
Microsoft MVP

Vista, Windows7, Mint Mate, Zorin, Windows 8
 
 

No utility that I know of.
My System SpecsSystem Spec
28 Dec 2013   #7
Lord of Rings

N/A
 
 

Bingo! I've found the solution. Total Commander can solve my problem in an easy way. Open Total Commander , choose Commands and then choose Branch View. What you get is a list of all files in a selected folder no matter if they are placed in a subfolder or not. Just a list of all files. That's it!!!
My System SpecsSystem Spec
28 Dec 2013   #8
whs
Microsoft MVP

Vista, Windows7, Mint Mate, Zorin, Windows 8
 
 

That sounds easy and I will retain it. Thanks for reporting back.
My System SpecsSystem Spec
28 Dec 2013   #9
dsperber

Windows 7 Pro x64 (1), Win7 Pro X64 (2)
 
 

Quote   Quote: Originally Posted by Lord of Rings View Post
Bingo! I've found the solution. Total Commander can solve my problem in an easy way. Open Total Commander , choose Commands and then choose Branch View. What you get is a list of all files in a selected folder no matter if they are placed in a subfolder or not. Just a list of all files. That's it!!!
Interesting.

This Total Commander program looks very similar to FreeCommander which is what I've been using as my Windows Explorer replacement ever since going from WinXP to Win7 back in late 2009. I used to use Power File Gold in WinXP, but it dropped off into legacy status (no longer listed on the vendor's web site as a product) and was incompatible with Win7 in its final form.

FreeCommander does not have this "branch view", which while I can see its purpose have never actually had the need to use in quite that form. I installed Total Commander to try it out, but didn't spend enough time to learn all of its configuration and settings options.

I normally use FreeCommander in a 2-pane OVER/UNDER presentation, which gives me much wider column content (including the Explorer-tree pane on the left of top and bottom, so that there really are FOUR panes in view) in the top and bottom panes than would otherwise be possible in left/right side-by-side presentation. I couldn't find where one could do that in Total Commander. FreeCommander also has a button to toggle it into and out of SINGLE PANE mode (i.e. still with Explorer Tree on the left, so it's actually two-panes but only for a single folder) in case you want to use the whole screen to look at a single folder with no need to have two folders in view at one time. I didn't see where Total Commander had such a toggle between 1-pane and 2-pane mode.

In other words FreeCommander had over/under or left/right views (both with and without the Explorer Tree pane) for both of its supported presentations, which are either single-folder full-screen or two-folder half-screen formats.



But there is another excellent Explorer-like two-pane side-by-side utility named Beyond Compare which is specifically designed to COMPARE two "supposedly parallel" directory structures including all of the files inside of them. It has a left/right 2-pane presentation and can show in "ALL" and "DIFFERENCES ONLY" mode. It also has a simple button to conveniently single-click "expand all folders" or "collapse all folder" from whatever are the top-level folders currently selected on the left and right side. This is sort of like Total Commander's "branch view" but it retains the folder-levels as visible breaks, showing both all folders and all files from that top level down. Obviously this is a different objective than just showing all files, but depending on your need this can also be exactly what you wanted or not.



Above is (a) differences only, and also (b) "expand all", meaning it is showing only those folders which contained differences and fully expanding them and any lower-level sub-folders as well. The program uses color coding to visibly designate when things are equal or not equal, or equal other than for date/time differences and therefore which side is "newer", or which side might have an "orphan" that is not on the other side.

Beyond Compare has hugely convenient and intuitive capability to copy/move/update/mirror from left side to right side or vice versa, either selectively just per your selections or automatically according to common-sense needs. It can also compare not only folders/files based on a whole variety of comparison criteria (including taking into account time-zone differences in directory date/time stamps, etc.) but can also compare file-to-file for content, both in text and binary and for commonly known file types. File-to-file comparison presentations can also be in "all" or "differences only" mode. Very convenient for keeping INI or CFG files up-to-date with previous modifications when installing a new version of a program.

Many ways to skin that cat.
My System SpecsSystem Spec
28 Dec 2013   #10
UsernameIssues

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by dsperber View Post
~~~
Many ways to skin that cat.
Poor cat :-)

Without installing anything:



Use Windows (file) Explorer
Select top level folder of interest
Search on asterisk *
Select the detailed view - if need be
Sort the search results - if need be
Select the first file
Scroll to the last file
Press and hold the shift key and select the last file

Scroll back up and make sure no folders are selected
Delete the files.
My System SpecsSystem Spec
Reply

 Deleting all files from a folder and its subfolders




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
How do I backup a top-level folder, but not subfolders?
I would like to be able to backup all of the documents I have at the root of "My Documents" but not the subfolders. Is there a way to do that? Thanks -mnetVG
Backup and Restore
apply folder options to all subfolders
Hello, i wonder if there is a way to apply specific folder settings to all subfolders without having to go through each one individually. Specifically i would like to know how to display the bit rate field in all subfolders of my music folder. I hope theres a way to do this and that someone out...
General Discussion
Gone/Disappeared: Entire folder and subfolders!
Got an awful shock last night. Opened word-processing program, "Open recent documents" menu came up, clicked on the recently-used document I wanted. Error message: "Document does not exist"!!!!!! Went straight to explorer, navigated to the file through various folders and subfolders, found...
General Discussion
Folders say how many Subfolders are in a folder
I seen this picture of a persons folder in the "Content" layout and in my picture you will see where it says "Date Modified" and that's where it said the sub-folder and other information. Where would I go to change that? I've looked everywhere.
General Discussion
Recover Files after deleting partition with folder structure?
Hi, i deleted my partitions by mistake. Drive originally had 2 partitions, 100MB (Windows 7 setup partitiion) and 930GB (Data storage partition). In summary: 1) I deleted the 100MB partition (because disk is(was) now storage disk) and 930gb partition were deleted too. 2) I started following...
General Discussion
Drive folder - subfolders
Hello, Sorry if such a question has been posted before. I couldn't find it. I don't know how, but suddenly when I double click in a folder inside of a drive folder, the drive folder in the left pane also opens and shows all subfolders. It wasn't like that before and I tried but could not...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 13:13.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App