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: command line to delete folder contents


05 Aug 2012   #11
Sebastian42

Win7 Ultimate x32
 
 

Still no obvious deletion of ANY files. I repeat that 'manually' I CAN clear the folder, but not by code (in a batch file).


My System SpecsSystem Spec
05 Aug 2012   #12
UsernameIssues

W7 Pro SP1 64bit
 
 

The only way that I know how to do it via a batch file involves messing with folder permissions... maybe someone else knows of a safer way.
My System SpecsSystem Spec
05 Aug 2012   #13
F5ing

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by Sebastian42 View Post
I repeat that 'manually' I CAN clear the folder, but not by code (in a batch file).
Pretty sure UsernameIssues is correct on this. If you are using Explorer to manually clean that folder I think all that's really happening is that you are cleaning files from 4 different folders that actually reside one level deeper.

If you look at that folder's contents offline (without Windows running) you'll see it only contains one file (that index.dat file) and a bunch of randomly named folders. I think 4 of those folders contain the temporary files you're deleting. The rest of those folders seem to be "decommissioned" folders containing even older temporary files.
My System SpecsSystem Spec
05 Aug 2012   #14
UsernameIssues

W7 Pro SP1 64bit
 
 

Sebastian42, I don't use a computer with W7. I have a couple of W7 virtual machines that I can play with and learn from and a few W7 computers that I support. I've used a script to clear IE's data for many years, but I don't know enough about W7 to know what needs to be changed in my script tn order to accomplish what you need.

The script calls a line like this: RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351
and then the script handles things that the "ClearMyTracksByProcess" call does not clear.

If you want to run that line inside a batch file, you may see a window popup showing you the progress of the cleanup - it depends on how many files there are to be cleaned and the speed of your computer - you might not see that window.

There are lots of web pages detailing the flags that can be used with this command.
The flag would be the 4351 part of:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

If you do not want to see the progress window, try:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 23035

None of this clears all of the info inside DOMStore and I don't know if that DOM info is what might be causing you problems inside WLM or not. Clearing the IE data via the regular user interface can clear the DOM info. My attempts to ferret out more knowledge about the flags used with ClearMyTracksByProcess via Process Monitor has not yielded the magic flag for clearing that DOM data yet.
My System SpecsSystem Spec
05 Aug 2012   #15
Layback Bear

Windows 7 Pro. 64/SP-1
 
 

This might do what you want.
Disk Cleanup : Extended
My System SpecsSystem Spec
05 Aug 2012   #16
UsernameIssues

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by Sebastian42 View Post
....I repeat that 'manually' I CAN clear the folder, but not by code (in a batch file).
Could you please post a screenshot of the files that you see before you do this manual cleanup.
My System SpecsSystem Spec
Reply

 command line to delete folder contents




Thread Tools



Similar help and support threads for2: command line to delete folder contents
Thread Forum
Folder - Delete from Command Prompt Tutorials
How to capture the contents of the clipboard using the command line? Software
How-to Open Any Folder From Command Line [cmd] ? General Discussion
Unable to change folder contents on remote folder in same HomeGroup Network & Sharing
Gpedit via command line Performance & Maintenance
Script or command to delete contents of Software Distribution folder? Windows Updates & Activation
Command Line 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 08:03 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App