Customization of Disk Cleanup

R

Ravi Verma

Hi David,

I have modified the clean.reg file and now it looks like this but still the subfolders are not getting deleted.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Temp Scan"
"Description"="Clears a custom folder."
"Folder"="c:\\tempscan|c:\\windows\\temp|C:\\WINDOWS\\Temporary Internet Files|D:\\Documents and Settings\\ravi\\Cookies"
"FileList"="*.*"
"Flags"=dword:00000000
"StateFlags"=dword:00000001
"DDEVCF_REMOVEDIRS"=dword:00000040

Regards,
Ravi Verma
"David Candy" <.> wrote in message There is a flag for that so dirs are incl with files.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

Yes last access is two days that means I can delete the folder by using disk cleanup after two days of last access. Now one more thing I want to know regarding subfolders, my scanner creates some temp folders automatically under c:\tempscan and disk cleanup is not being able to delete those subfolders. I want to delete those subfolders but I cannot give the folder name because my scanner creates some random folder name. If delete those folders is not possible then I would like to know if the contents of those folders can be emptied or not.
In short, I want to know:
1. Deleting subfolders who name I can't guess.
2. Deleting contents(files) of subfolders(it can be deeper ie mainfolder\subfolder\subfolder\....contents) again the subfolders whose name I can't guess. I just want to delete the contents(files) of the randomly created subfolders.

Regards,
Ravi Verma
"David Candy" <.> wrote in message Remember last access is two days.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

There is an interesting finding. I changed the directory to D:\WINDOWS\Prefetch in my clean.reg file and disk cleanup utility showed 135KB data. The ran disk cleanup and then checked the prefetch folder, everything was there, nothing was deleted. I then again started disk cleanup utility and this time I noticed the in Prefetch folder disk cleanup is showing 0KB.

That means according to disk cleanup, everything in the folder is deleted but in reality nothing is deleted.
David, I think there is some problem in the registry setting in our clean.reg file, please check it for me and verify if everything is correct.

I am pasting the lastest clean.reg file for you.
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\E

xplorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Prefetch"
"Description"="Clears a custom folder."
"LastAccess"=dword:00000002
"Folder"="D:\\WINDOWS\\Prefetch"
"FileList"="*.*"
"Flags"=dword:00000000
"StateFlags"=dword:00000001

Chances are that @, LastAccess, Flags, StateFlags, out of these someone is incorrect.

Please check, I will keep on trying till I succeed.

Regards,
Ravi Verma
"David Candy" <.> wrote in message When using backslashes you must use 2 for 1.

"Folder"="C:\\tempscan"

So folder wasn't merged. Why aren't you reading regedit.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ok thanx, now My clean.reg file is like this:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

On double clicking on the clean.reg file, now it got added to the registry. Everthing is fine. I then restarted my computer and then changed the computer time to 20 April 2006. But still the files in my c:\tempscan are there they didn't got erased.

Regards,
Ravi verma
"David Candy" <.> wrote in message You still need to run disk cleanup. I don't know what hold your folders mean, I've told you already how to do multiple folders and also how to do sub folders. If you want to know what 5 puts there export a reg file. It's too long to type. REGEDIT4 is easier.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
you mean it automatically deletes the files? no need to run disk clean up utility? that will be better but I would still like to know if I can extend the diskcleanup utility to hold my folders too.?
Note: My registry version is 5 so should i put
REGEDIT5 on top of the file?
Regards,
Ravi
"David Candy" <.> wrote in message A Reg file has one of two lines at the top. For this file

REGEDIT4

will do. The newer one, which we aren't using any new features from, has some super long string. Export a regfile to see. It will also work on older OSs unlike the new one.

So this file deletes files with a last access date of 2 days, which aren't read only or system?

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

I am very much interested in knowing about the flags. to be frank at present I can't get what you have typed. anyways, right now my clean.reg file looks like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

But when I double click on clean.reg file a message is displayed after clicking yes to the normal message. it says:
"Cannot import D:\Documents and Settings\ravi\My Documents\clean.reg: The specified file is not a registry script. You can only import binary registry files from withing the registry editor."

it there some format for writing registry script? I will look it in google if there is any, I typed here because it was important to keep you posted.

Regards,
Ravi


"David Candy" <.> wrote in message Yes and yes. But you may want to reconsider *.* unless you know that no other files are in or will ever be in that folder. Automate as little as possible.

Here are the flags if you are interested.
Flags REG_DWORD or REG_BINARY Flags controlling elements of the search and cleaning procedure. One or more of the following values. Flag Value Meaning
DDEVCF_DOSUBDIRS 0x00000001 Search and remove recursively.
DDEVCF_REMOVEAFTERCLEAN 0x00000002 After the handler is run once, remove it from the registry.
DDEVCF_REMOVEREADONLY 0x00000004 Remove files that meet the search criteria even if they are read-only.
DDEVCF_REMOVESYSTEM 0x00000008 Remove files that meet the search criteria even if they are system files.
DDEVCF_REMOVEHIDDEN 0x00000010 Remove files that meet the search criteria even if they are hidden files.
DDEVCF_DONTSHOWIFZERO 0x00000020 Do not display this handler in the disk cleanup manager if no files match its search criteria.
DDEVCF_REMOVEDIRS 0x00000040 Match the FileList value against directories and remove matches and all of their subdirectories.
DDEVCF_RUNIFOUTOFDISKSPACE 0x00000080 Run this handler only if available disk space has fallen below the critical value, determined by the disk cleanup manager setting the EVCF_OUTOFDISKSPACE flag through IEmptyVolumeCache::Initialize or IEmptyVolumeCache2::InitializeEx.
DDEVCF_REMOVEPARENTDIR 0x00000100 Remove the parent directory of the specified files once the cleaner has run.
DDEVCF_PRIVATE_LASTACCESS 0x10000000 Use the LastAccess value, if provided, in ascertaining which files should be cleaned. This flag is ignored when using the DataDrivenCleaner—any provided LastAccess value is always used.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much now my file looks like this.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Cu

stomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.jpg|*.bmp"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

Now, I have two questions:
1. can i save this text file into reg file like clean.reg and double click
on the file. will that add these entries into the registry?
2. Can I use "FileList"="*.*" ?

Regards,
Ravi Verma
now I have two questions to ask,
"David Candy" <.> wrote in message
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

You put above in a text file and edit the fields,
Firstly what files do you want to delete. Lets assume your scanner does TIF
files. Lets also say that you edit the TIF files with paint and save some as
TIFF. So file list will become

"FileList"="*.tif|*.tiff"

For the path if you just want to specify a hard coded name just type it -
the above numbers are how regedit exports text in a special format that
converts %windir% to c:\windows. In Regedit you will see it as text.

"Folder"="c:\tempscan"

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much for your suggestion but If you can put it in step wise
then
it will be little easier for me. say for example, my scanner uses a temp
folder c:\tempscan and it keeps on growing as i keep on scanning images.
now
what I want is the I want to extend the windows inbuild disk cleanup
utility
to include this folder as well. Please guide me step wise to do this. so
that following the steps I can add any number of folders into the disk
cleanup utility which will save lot of time.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
You can extend the inbuilt cleaner.

Here's one I just made that does *.fred in c:\desktop if more than 2 days
since last accessed.
Merge the file then look here in the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter
and alter the path and filetype (I didn't want to delete my hard drive by
mistake as 98 disk cleanup threatened to do if you customised parameters).
Also as the path is an Expand type it's in hex in the regfile and in
english
in the reg (because regfiles don't support expand so it uses hex). If
using
environmental variables the data type must be expand.

I created a file called New Text Document.Fred, set my clock forward, and
it
deleted. It didn't delete unless I set the clock forward so it shows the
time is working (note it is last access not modified or created).

To use
cleanmgr /sageset:<a number>
and only tick the Customer Deleter
This sets it up

Then to run or schedule
cleanmgr /sagerun:<same number used above>

You can have as many pairs of sageset/run as you want.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

To make multiple cleaners just change the last key name (CustomDeleter)

Seperate multiple filetypes like so (pipe)
*.fred|*.horse

Seperate multiple directories the same way.
c:\desktop|C:\games

Use this syntax for directories ?:\recycled

Which will do all drives or the specified drive (depending on how cleanup
is
being used)

Last Access can be set to 0 for instant deleting.

AFAIK Disk Cleanup won't delete user data only IE's cache. There is more
there than IE's cache.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Hi,

I want to add a few more folders into the windows xp disk cleanup
utility.
The utility already have, Downloaded Program Files, Temporary Internet
Files, Recycle Bin, Temporary files, WebClient/Publisher Temporary Files,
Compress old files, Catalog files for the content indexer. Now I want to
add
a few more folders for cleaning like prefetch, cookies, and some other
temp
folders which I use. Is it possible to add a few folders into the
diskcleanup utility of windows xp? if yes please let me know how. if it
can
be customized then it will be of great help to users like us.

Regards,
Ravi Verma
 
D

David Candy

C:\\WINDOWS\\Temporary Internet Files
Why are you doing this? This is not the way to do it. It has it's own program to clear it correctly.

C:\windows\temp has it's own cleaner.

"Flags"=dword:00000000

Flags aren't set.

My role here is to teach not solve your problem. I've given you all the information you need. So I'll repeat READ THE FLAGS. You have to do your own assignments - assignments aren't for assesment but is when learning actually takes place, marks are just the motivation to make you do it with genuine effort (although I won't be marking you). It's when theory is turned into practice.

So your next post I'll expect questions about FLAGS and what you think you should do with them.

You do realise it is far quicker to do it by hand. I don't use Disk Cleanup at all. It takes me 5 secs to clean my computer.
1. Type %temp% in Start Run (and as SR remembers I only type it the first time)
2. Ctrl + A
3 Press Delete
4. Repeat above very rarely with Temp rather than %Temp%. Temp is used when noone is logged in and is usually empty as usually nothing runs. Setup progs that require a reboot to install (as opposed to needing a reboot after installing) sometimes use it.
5. R/C Internet Icon - Properties - Delete Files and tick Offline Content - Ok
6 R/C Recycle Bin - Empty Recycle Bin

There is nothing else worth cleaning.

I'm concerned with your attitude of wanting to delete everything.
--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

I have modified the clean.reg file and now it looks like this but still the subfolders are not getting deleted.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Temp Scan"
"Description"="Clears a custom folder."
"Folder"="c:\\tempscan|c:\\windows\\temp|C:\\WINDOWS\\Temporary Internet Files|D:\\Documents and Settings\\ravi\\Cookies"
"FileList"="*.*"
"Flags"=dword:00000000
"StateFlags"=dword:00000001
"DDEVCF_REMOVEDIRS"=dword:00000040

Regards,
Ravi Verma
"David Candy" <.> wrote in message There is a flag for that so dirs are incl with files.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

Yes last access is two days that means I can delete the folder by using disk cleanup after two days of last access. Now one more thing I want to know regarding subfolders, my scanner creates some temp folders automatically under c:\tempscan and disk cleanup is not being able to delete those subfolders. I want to delete those subfolders but I cannot give the folder name because my scanner creates some random folder name. If delete those folders is not possible then I would like to know if the contents of those folders can be emptied or not.
In short, I want to know:
1. Deleting subfolders who name I can't guess.
2. Deleting contents(files) of subfolders(it can be deeper ie mainfolder\subfolder\subfolder\....contents) again the subfolders whose name I can't guess. I just want to delete the contents(files) of the randomly created subfolders.

Regards,
Ravi Verma
"David Candy" <.> wrote in message Remember last access is two days.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

There is an interesting finding. I changed the directory to D:\WINDOWS\Prefetch in my clean.reg file and disk cleanup utility showed 135KB data. The ran disk cleanup and then checked the prefetch folder, everything was there, nothing was deleted. I then again started disk cleanup utility and this time I noticed the in Prefetch folder disk cleanup is showing 0KB.

That means according to disk cleanup, everything in the folder is deleted but in reality nothing is deleted.
David, I think there is some problem in the registry setting in our clean.reg file, please check it for me and verify if everything is correct.

I am pasting the lastest clean.reg file for you.
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\E

xplorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Prefetch"
"Description"="Clears a custom folder."
"LastAccess"=dword:00000002
"Folder"="D:\\WINDOWS\\Prefetch"
"FileList"="*.*"
"Flags"=dword:00000000
"StateFlags"=dword:00000001

Chances are that @, LastAccess, Flags, StateFlags, out of these someone is incorrect.

Please check, I will keep on trying till I succeed.

Regards,
Ravi Verma
"David Candy" <.> wrote in message When using backslashes you must use 2 for 1.

"Folder"="C:\\tempscan"

So folder wasn't merged. Why aren't you reading regedit.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ok thanx, now My clean.reg file is like this:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

On double clicking on the clean.reg file, now it got added to the registry. Everthing is fine. I then restarted my computer and then changed the computer time to 20 April 2006. But still the files in my c:\tempscan are there they didn't got erased.

Regards,
Ravi verma
"David Candy" <.> wrote in message You still need to run disk cleanup. I don't know what hold your folders mean, I've told you already how to do multiple folders and also how to do sub folders. If you want to know what 5 puts there export a reg file. It's too long to type. REGEDIT4 is easier.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
you mean it automatically deletes the files? no need to run disk clean up utility? that will be better but I would still like to know if I can extend the diskcleanup utility to hold my folders too.?
Note: My registry version is 5 so should i put
REGEDIT5 on top of the file?
Regards,
Ravi
"David Candy" <.> wrote in message A Reg file has one of two lines at the top. For this file

REGEDIT4

will do. The newer one, which we aren't using any new features from, has some super long string. Export a regfile to see. It will also work on older OSs unlike the new one.

So this file deletes files with a last access date of 2 days, which aren't read only or system?

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

I am very much interested in knowing about the flags. to be frank at present I can't get what you have typed. anyways, right now my clean.reg file looks like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

But when I double click on clean.reg file a message is displayed after clicking yes to the normal message. it says:
"Cannot import D:\Documents and Settings\ravi\My Documents\clean.reg: The specified file is not a registry script. You can only import binary registry files from withing the registry editor."

it there some format for writing registry script? I will look it in google if there is any, I typed here because it was important to keep you posted.

Regards,
Ravi


"David Candy" <.> wrote in message Yes and yes. But you may want to reconsider *.* unless you know that no other files are in or will ever be in that folder. Automate as little as possible.

Here are the flags if you are interested.
FlagsREG_DWORD or REG_BINARYFlags controlling elements of the search and cleaning procedure. One or more of the following values. FlagValueMeaning
DDEVCF_DOSUBDIRS0x00000001Search and remove recursively.
DDEVCF_REMOVEAFTERCLEAN0x00000002After the handler is run once, remove it from the registry.
DDEVCF_REMOVEREADONLY0x00000004Remove files that meet the search criteria even if they are read-only.
DDEVCF_REMOVESYSTEM0x00000008Remove files that meet the search criteria even if they are system files.
DDEVCF_REMOVEHIDDEN0x00000010Remove files that meet the search criteria even if they are hidden files.
DDEVCF_DONTSHOWIFZERO0x00000020Do not display this handler in the disk cleanup manager if no files match its search criteria.
DDEVCF_REMOVEDIRS0x00000040Match the FileList value against directories and remove matches and all of their subdirectories.
DDEVCF_RUNIFOUTOFDISKSPACE0x00000080Run this handler only if available disk space has fallen below the critical value, determined by the disk cleanup manager setting the EVCF_OUTOFDISKSPACE flag through IEmptyVolumeCache::Initialize or IEmptyVolumeCache2::InitializeEx.
DDEVCF_REMOVEPARENTDIR0x00000100Remove the parent directory of the specified files once the cleaner has run.
DDEVCF_PRIVATE_LASTACCESS0x10000000Use the LastAccess value, if provided, in ascertaining which files should be cleaned. This flag is ignored when using the DataDrivenCleaner—any provided LastAccess value is always used.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much now my file looks like this.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Cu

stomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.jpg|*.bmp"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

Now, I have two questions:
1. can i save this text file into reg file like clean.reg and double click
on the file. will that add these entries into the registry?
2. Can I use "FileList"="*.*" ?

Regards,
Ravi Verma
now I have two questions to ask,
"David Candy" <.> wrote in message
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

You put above in a text file and edit the fields,
Firstly what files do you want to delete. Lets assume your scanner does TIF
files. Lets also say that you edit the TIF files with paint and save some as
TIFF. So file list will become

"FileList"="*.tif|*.tiff"

For the path if you just want to specify a hard coded name just type it -
the above numbers are how regedit exports text in a special format that
converts %windir% to c:\windows. In Regedit you will see it as text.

"Folder"="c:\tempscan"

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much for your suggestion but If you can put it in step wise
then
it will be little easier for me. say for example, my scanner uses a temp
folder c:\tempscan and it keeps on growing as i keep on scanning images.
now
what I want is the I want to extend the windows inbuild disk cleanup
utility
to include this folder as well. Please guide me step wise to do this. so
that following the steps I can add any number of folders into the disk
cleanup utility which will save lot of time.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
You can extend the inbuilt cleaner.

Here's one I just made that does *.fred in c:\desktop if more than 2 days
since last accessed.
Merge the file then look here in the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter
and alter the path and filetype (I didn't want to delete my hard drive by
mistake as 98 disk cleanup threatened to do if you customised parameters).
Also as the path is an Expand type it's in hex in the regfile and in
english
in the reg (because regfiles don't support expand so it uses hex). If
using
environmental variables the data type must be expand.

I created a file called New Text Document.Fred, set my clock forward, and
it
deleted. It didn't delete unless I set the clock forward so it shows the
time is working (note it is last access not modified or created).

To use
cleanmgr /sageset:<a number>
and only tick the Customer Deleter
This sets it up

Then to run or schedule
cleanmgr /sagerun:<same number used above>

You can have as many pairs of sageset/run as you want.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

To make multiple cleaners just change the last key name (CustomDeleter)

Seperate multiple filetypes like so (pipe)
*.fred|*.horse

Seperate multiple directories the same way.
c:\desktop|C:\games

Use this syntax for directories ?:\recycled

Which will do all drives or the specified drive (depending on how cleanup
is
being used)

Last Access can be set to 0 for instant deleting.

AFAIK Disk Cleanup won't delete user data only IE's cache. There is more
there than IE's cache.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Hi,

I want to add a few more folders into the windows xp disk cleanup
utility.
The utility already have, Downloaded Program Files, Temporary Internet
Files, Recycle Bin, Temporary files, WebClient/Publisher Temporary Files,
Compress old files, Catalog files for the content indexer. Now I want to
add
a few more folders for cleaning like prefetch, cookies, and some other
temp
folders which I use. Is it possible to add a few folders into the
diskcleanup utility of windows xp? if yes please let me know how. if it
can
be customized then it will be of great help to users like us.

Regards,
Ravi Verma
 
R

Ravi Verma

Ha ha ha, Hey David Thnx very much for your concern, ur really a jem of a
guy. Whatever u said it absolutely true, but when u get to know my situation
then I hope u will understand.
I have a small tech support company, a very small and a new company. It is
consist of three staffs, myself, and two other guys with very little, almost
nil computer knowledge. I use them for maintenance works and other
non-technical works. so I want to create some customization in windows so
that they can easily perform the maintenance and system restore jobs. I have
also managed to clone the c drive of all my clients with data directories
redirected in d drive, like my document and other data folders, I don't
allow my clients to keep any file on c drive. so that if any software
problem or virus problem occurs, my boys can go and simple restore the c
drive. without needing to do anything else. right now everything is fine but
the only problem is wiht outlook, i want to change the mail directory,
addressbook and all other settings to d drive, i m working on it, lets c
when i will get success.

Regards,
Ravi Verma

"David Candy" <.> wrote in message
C:\\WINDOWS\\Temporary Internet Files
Why are you doing this? This is not the way to do it. It has it's own
program to clear it correctly.

C:\windows\temp has it's own cleaner.

"Flags"=dword:00000000

Flags aren't set.

My role here is to teach not solve your problem. I've given you all the
information you need. So I'll repeat READ THE FLAGS. You have to do your own
assignments - assignments aren't for assesment but is when learning actually
takes place, marks are just the motivation to make you do it with genuine
effort (although I won't be marking you). It's when theory is turned into
practice.

So your next post I'll expect questions about FLAGS and what you think you
should do with them.

You do realise it is far quicker to do it by hand. I don't use Disk Cleanup
at all. It takes me 5 secs to clean my computer.
1. Type %temp% in Start Run (and as SR remembers I only type it the first
time)
2. Ctrl + A
3 Press Delete
4. Repeat above very rarely with Temp rather than %Temp%. Temp is used when
noone is logged in and is usually empty as usually nothing runs. Setup progs
that require a reboot to install (as opposed to needing a reboot after
installing) sometimes use it.
5. R/C Internet Icon - Properties - Delete Files and tick Offline Content -
Ok
6 R/C Recycle Bin - Empty Recycle Bin

There is nothing else worth cleaning.

I'm concerned with your attitude of wanting to delete everything.
--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

I have modified the clean.reg file and now it looks like this but still the
subfolders are not getting deleted.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Temp Scan"
"Description"="Clears a custom folder."
"Folder"="c:\\tempscan|c:\\windows\\temp|C:\\WINDOWS\\Temporary Internet
Files|D:\\Documents and Settings\\ravi\\Cookies"
"FileList"="*.*"
"Flags"=dword:00000000
"StateFlags"=dword:00000001
"DDEVCF_REMOVEDIRS"=dword:00000040

Regards,
Ravi Verma
"David Candy" <.> wrote in message
There is a flag for that so dirs are incl with files.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

Yes last access is two days that means I can delete the folder by using disk
cleanup after two days of last access. Now one more thing I want to know
regarding subfolders, my scanner creates some temp folders automatically
under c:\tempscan and disk cleanup is not being able to delete those
subfolders. I want to delete those subfolders but I cannot give the folder
name because my scanner creates some random folder name. If delete those
folders is not possible then I would like to know if the contents of those
folders can be emptied or not.
In short, I want to know:
1. Deleting subfolders who name I can't guess.
2. Deleting contents(files) of subfolders(it can be deeper ie
mainfolder\subfolder\subfolder\....contents) again the subfolders whose name
I can't guess. I just want to delete the contents(files) of the randomly
created subfolders.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
Remember last access is two days.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

There is an interesting finding. I changed the directory to
D:\WINDOWS\Prefetch in my clean.reg file and disk cleanup utility showed
135KB data. The ran disk cleanup and then checked the prefetch folder,
everything was there, nothing was deleted. I then again started disk cleanup
utility and this time I noticed the in Prefetch folder disk cleanup is
showing 0KB.

That means according to disk cleanup, everything in the folder is deleted
but in reality nothing is deleted.
David, I think there is some problem in the registry setting in our
clean.reg file, please check it for me and verify if everything is correct.

I am pasting the lastest clean.reg file for you.
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\E

xplorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Prefetch"
"Description"="Clears a custom folder."
"LastAccess"=dword:00000002
"Folder"="D:\\WINDOWS\\Prefetch"
"FileList"="*.*"
"Flags"=dword:00000000
"StateFlags"=dword:00000001

Chances are that @, LastAccess, Flags, StateFlags, out of these someone is
incorrect.

Please check, I will keep on trying till I succeed.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
When using backslashes you must use 2 for 1.

"Folder"="C:\\tempscan"

So folder wasn't merged. Why aren't you reading regedit.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ok thanx, now My clean.reg file is like this:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

On double clicking on the clean.reg file, now it got added to the registry.
Everthing is fine. I then restarted my computer and then changed the
computer time to 20 April 2006. But still the files in my c:\tempscan are
there they didn't got erased.

Regards,
Ravi verma
"David Candy" <.> wrote in message
You still need to run disk cleanup. I don't know what hold your folders
mean, I've told you already how to do multiple folders and also how to do
sub folders. If you want to know what 5 puts there export a reg file. It's
too long to type. REGEDIT4 is easier.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
you mean it automatically deletes the files? no need to run disk clean up
utility? that will be better but I would still like to know if I can extend
the diskcleanup utility to hold my folders too.?
Note: My registry version is 5 so should i put
REGEDIT5 on top of the file?
Regards,
Ravi
"David Candy" <.> wrote in message
A Reg file has one of two lines at the top. For this file

REGEDIT4

will do. The newer one, which we aren't using any new features from, has
some super long string. Export a regfile to see. It will also work on older
OSs unlike the new one.

So this file deletes files with a last access date of 2 days, which aren't
read only or system?

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

I am very much interested in knowing about the flags. to be frank at present
I can't get what you have typed. anyways, right now my clean.reg file looks
like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

But when I double click on clean.reg file a message is displayed after
clicking yes to the normal message. it says:
"Cannot import D:\Documents and Settings\ravi\My Documents\clean.reg: The
specified file is not a registry script. You can only import binary registry
files from withing the registry editor."

it there some format for writing registry script? I will look it in google
if there is any, I typed here because it was important to keep you posted.

Regards,
Ravi


"David Candy" <.> wrote in message
Yes and yes. But you may want to reconsider *.* unless you know that no
other files are in or will ever be in that folder. Automate as little as
possible.

Here are the flags if you are interested.
FlagsREG_DWORD or REG_BINARYFlags controlling elements of the search and
cleaning procedure. One or more of the following values. FlagValueMeaning
DDEVCF_DOSUBDIRS0x00000001Search and remove recursively.
DDEVCF_REMOVEAFTERCLEAN0x00000002After the handler is run once, remove it
from the registry.
DDEVCF_REMOVEREADONLY0x00000004Remove files that meet the search criteria
even if they are read-only.
DDEVCF_REMOVESYSTEM0x00000008Remove files that meet the search criteria even
if they are system files.
DDEVCF_REMOVEHIDDEN0x00000010Remove files that meet the search criteria even
if they are hidden files.
DDEVCF_DONTSHOWIFZERO0x00000020Do not display this handler in the disk
cleanup manager if no files match its search criteria.
DDEVCF_REMOVEDIRS0x00000040Match the FileList value against directories and
remove matches and all of their subdirectories.
DDEVCF_RUNIFOUTOFDISKSPACE0x00000080Run this handler only if available disk
space has fallen below the critical value, determined by the disk cleanup
manager setting the EVCF_OUTOFDISKSPACE flag through
IEmptyVolumeCache::Initialize or IEmptyVolumeCache2::InitializeEx.
DDEVCF_REMOVEPARENTDIR0x00000100Remove the parent directory of the specified
files once the cleaner has run.
DDEVCF_PRIVATE_LASTACCESS0x10000000Use the LastAccess value, if provided, in
ascertaining which files should be cleaned. This flag is ignored when using
the DataDrivenCleaner—any provided LastAccess value is always used.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much now my file looks like this.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Cu

stomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.jpg|*.bmp"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

Now, I have two questions:
1. can i save this text file into reg file like clean.reg and double click
on the file. will that add these entries into the registry?
2. Can I use "FileList"="*.*" ?

Regards,
Ravi Verma
now I have two questions to ask,
"David Candy" <.> wrote in message
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

You put above in a text file and edit the fields,
Firstly what files do you want to delete. Lets assume your scanner does
TIF
files. Lets also say that you edit the TIF files with paint and save some
as
TIFF. So file list will become

"FileList"="*.tif|*.tiff"

For the path if you just want to specify a hard coded name just type it -
the above numbers are how regedit exports text in a special format that
converts %windir% to c:\windows. In Regedit you will see it as text.

"Folder"="c:\tempscan"

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much for your suggestion but If you can put it in step wise
then
it will be little easier for me. say for example, my scanner uses a temp
folder c:\tempscan and it keeps on growing as i keep on scanning images.
now
what I want is the I want to extend the windows inbuild disk cleanup
utility
to include this folder as well. Please guide me step wise to do this. so
that following the steps I can add any number of folders into the disk
cleanup utility which will save lot of time.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
You can extend the inbuilt cleaner.

Here's one I just made that does *.fred in c:\desktop if more than 2 days
since last accessed.
Merge the file then look here in the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter
and alter the path and filetype (I didn't want to delete my hard drive by
mistake as 98 disk cleanup threatened to do if you customised
parameters).
Also as the path is an Expand type it's in hex in the regfile and in
english
in the reg (because regfiles don't support expand so it uses hex). If
using
environmental variables the data type must be expand.

I created a file called New Text Document.Fred, set my clock forward, and
it
deleted. It didn't delete unless I set the clock forward so it shows the
time is working (note it is last access not modified or created).

To use
cleanmgr /sageset:<a number>
and only tick the Customer Deleter
This sets it up

Then to run or schedule
cleanmgr /sagerun:<same number used above>

You can have as many pairs of sageset/run as you want.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

To make multiple cleaners just change the last key name (CustomDeleter)

Seperate multiple filetypes like so (pipe)
*.fred|*.horse

Seperate multiple directories the same way.
c:\desktop|C:\games

Use this syntax for directories ?:\recycled

Which will do all drives or the specified drive (depending on how cleanup
is
being used)

Last Access can be set to 0 for instant deleting.

AFAIK Disk Cleanup won't delete user data only IE's cache. There is more
there than IE's cache.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Hi,

I want to add a few more folders into the windows xp disk cleanup
utility.
The utility already have, Downloaded Program Files, Temporary Internet
Files, Recycle Bin, Temporary files, WebClient/Publisher Temporary
Files,
Compress old files, Catalog files for the content indexer. Now I want to
add
a few more folders for cleaning like prefetch, cookies, and some other
temp
folders which I use. Is it possible to add a few folders into the
diskcleanup utility of windows xp? if yes please let me know how. if it
can
be customized then it will be of great help to users like us.

Regards,
Ravi Verma
 
D

David Candy

Outlook. Move the PST file. Start Outlook. It will create a new file. Open the old file. You will now have two files in the list. Close Outlook. Delete the new file. Start Outlook. As it now finds the old file it is happy and will make it the only file.

Above is from memory. I don't install OL.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Ha ha ha, Hey David Thnx very much for your concern, ur really a jem of a
guy. Whatever u said it absolutely true, but when u get to know my situation
then I hope u will understand.
I have a small tech support company, a very small and a new company. It is
consist of three staffs, myself, and two other guys with very little, almost
nil computer knowledge. I use them for maintenance works and other
non-technical works. so I want to create some customization in windows so
that they can easily perform the maintenance and system restore jobs. I have
also managed to clone the c drive of all my clients with data directories
redirected in d drive, like my document and other data folders, I don't
allow my clients to keep any file on c drive. so that if any software
problem or virus problem occurs, my boys can go and simple restore the c
drive. without needing to do anything else. right now everything is fine but
the only problem is wiht outlook, i want to change the mail directory,
addressbook and all other settings to d drive, i m working on it, lets c
when i will get success.

Regards,
Ravi Verma

"David Candy" <.> wrote in message
C:\\WINDOWS\\Temporary Internet Files
Why are you doing this? This is not the way to do it. It has it's own
program to clear it correctly.

C:\windows\temp has it's own cleaner.

"Flags"=dword:00000000

Flags aren't set.

My role here is to teach not solve your problem. I've given you all the
information you need. So I'll repeat READ THE FLAGS. You have to do your own
assignments - assignments aren't for assesment but is when learning actually
takes place, marks are just the motivation to make you do it with genuine
effort (although I won't be marking you). It's when theory is turned into
practice.

So your next post I'll expect questions about FLAGS and what you think you
should do with them.

You do realise it is far quicker to do it by hand. I don't use Disk Cleanup
at all. It takes me 5 secs to clean my computer.
1. Type %temp% in Start Run (and as SR remembers I only type it the first
time)
2. Ctrl + A
3 Press Delete
4. Repeat above very rarely with Temp rather than %Temp%. Temp is used when
noone is logged in and is usually empty as usually nothing runs. Setup progs
that require a reboot to install (as opposed to needing a reboot after
installing) sometimes use it.
5. R/C Internet Icon - Properties - Delete Files and tick Offline Content -
Ok
6 R/C Recycle Bin - Empty Recycle Bin

There is nothing else worth cleaning.

I'm concerned with your attitude of wanting to delete everything.
--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

I have modified the clean.reg file and now it looks like this but still the
subfolders are not getting deleted.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Temp Scan"
"Description"="Clears a custom folder."
"Folder"="c:\\tempscan|c:\\windows\\temp|C:\\WINDOWS\\Temporary Internet
Files|D:\\Documents and Settings\\ravi\\Cookies"
"FileList"="*.*"
"Flags"=dword:00000000
"StateFlags"=dword:00000001
"DDEVCF_REMOVEDIRS"=dword:00000040

Regards,
Ravi Verma
"David Candy" <.> wrote in message
There is a flag for that so dirs are incl with files.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

Yes last access is two days that means I can delete the folder by using disk
cleanup after two days of last access. Now one more thing I want to know
regarding subfolders, my scanner creates some temp folders automatically
under c:\tempscan and disk cleanup is not being able to delete those
subfolders. I want to delete those subfolders but I cannot give the folder
name because my scanner creates some random folder name. If delete those
folders is not possible then I would like to know if the contents of those
folders can be emptied or not.
In short, I want to know:
1. Deleting subfolders who name I can't guess.
2. Deleting contents(files) of subfolders(it can be deeper ie
mainfolder\subfolder\subfolder\....contents) again the subfolders whose name
I can't guess. I just want to delete the contents(files) of the randomly
created subfolders.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
Remember last access is two days.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

There is an interesting finding. I changed the directory to
D:\WINDOWS\Prefetch in my clean.reg file and disk cleanup utility showed
135KB data. The ran disk cleanup and then checked the prefetch folder,
everything was there, nothing was deleted. I then again started disk cleanup
utility and this time I noticed the in Prefetch folder disk cleanup is
showing 0KB.

That means according to disk cleanup, everything in the folder is deleted
but in reality nothing is deleted.
David, I think there is some problem in the registry setting in our
clean.reg file, please check it for me and verify if everything is correct.

I am pasting the lastest clean.reg file for you.
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\E

xplorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Prefetch"
"Description"="Clears a custom folder."
"LastAccess"=dword:00000002
"Folder"="D:\\WINDOWS\\Prefetch"
"FileList"="*.*"
"Flags"=dword:00000000
"StateFlags"=dword:00000001

Chances are that @, LastAccess, Flags, StateFlags, out of these someone is
incorrect.

Please check, I will keep on trying till I succeed.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
When using backslashes you must use 2 for 1.

"Folder"="C:\\tempscan"

So folder wasn't merged. Why aren't you reading regedit.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ok thanx, now My clean.reg file is like this:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

On double clicking on the clean.reg file, now it got added to the registry.
Everthing is fine. I then restarted my computer and then changed the
computer time to 20 April 2006. But still the files in my c:\tempscan are
there they didn't got erased.

Regards,
Ravi verma
"David Candy" <.> wrote in message
You still need to run disk cleanup. I don't know what hold your folders
mean, I've told you already how to do multiple folders and also how to do
sub folders. If you want to know what 5 puts there export a reg file. It's
too long to type. REGEDIT4 is easier.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
you mean it automatically deletes the files? no need to run disk clean up
utility? that will be better but I would still like to know if I can extend
the diskcleanup utility to hold my folders too.?
Note: My registry version is 5 so should i put
REGEDIT5 on top of the file?
Regards,
Ravi
"David Candy" <.> wrote in message
A Reg file has one of two lines at the top. For this file

REGEDIT4

will do. The newer one, which we aren't using any new features from, has
some super long string. Export a regfile to see. It will also work on older
OSs unlike the new one.

So this file deletes files with a last access date of 2 days, which aren't
read only or system?

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

I am very much interested in knowing about the flags. to be frank at present
I can't get what you have typed. anyways, right now my clean.reg file looks
like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

But when I double click on clean.reg file a message is displayed after
clicking yes to the normal message. it says:
"Cannot import D:\Documents and Settings\ravi\My Documents\clean.reg: The
specified file is not a registry script. You can only import binary registry
files from withing the registry editor."

it there some format for writing registry script? I will look it in google
if there is any, I typed here because it was important to keep you posted.

Regards,
Ravi


"David Candy" <.> wrote in message
Yes and yes. But you may want to reconsider *.* unless you know that no
other files are in or will ever be in that folder. Automate as little as
possible.

Here are the flags if you are interested.
FlagsREG_DWORD or REG_BINARYFlags controlling elements of the search and
cleaning procedure. One or more of the following values. FlagValueMeaning
DDEVCF_DOSUBDIRS0x00000001Search and remove recursively.
DDEVCF_REMOVEAFTERCLEAN0x00000002After the handler is run once, remove it
from the registry.
DDEVCF_REMOVEREADONLY0x00000004Remove files that meet the search criteria
even if they are read-only.
DDEVCF_REMOVESYSTEM0x00000008Remove files that meet the search criteria even
if they are system files.
DDEVCF_REMOVEHIDDEN0x00000010Remove files that meet the search criteria even
if they are hidden files.
DDEVCF_DONTSHOWIFZERO0x00000020Do not display this handler in the disk
cleanup manager if no files match its search criteria.
DDEVCF_REMOVEDIRS0x00000040Match the FileList value against directories and
remove matches and all of their subdirectories.
DDEVCF_RUNIFOUTOFDISKSPACE0x00000080Run this handler only if available disk
space has fallen below the critical value, determined by the disk cleanup
manager setting the EVCF_OUTOFDISKSPACE flag through
IEmptyVolumeCache::Initialize or IEmptyVolumeCache2::InitializeEx.
DDEVCF_REMOVEPARENTDIR0x00000100Remove the parent directory of the specified
files once the cleaner has run.
DDEVCF_PRIVATE_LASTACCESS0x10000000Use the LastAccess value, if provided, in
ascertaining which files should be cleaned. This flag is ignored when using
the DataDrivenCleaner—any provided LastAccess value is always used.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much now my file looks like this.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Cu

stomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.jpg|*.bmp"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

Now, I have two questions:
1. can i save this text file into reg file like clean.reg and double click
on the file. will that add these entries into the registry?
2. Can I use "FileList"="*.*" ?

Regards,
Ravi Verma
now I have two questions to ask,
"David Candy" <.> wrote in message
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

You put above in a text file and edit the fields,
Firstly what files do you want to delete. Lets assume your scanner does
TIF
files. Lets also say that you edit the TIF files with paint and save some
as
TIFF. So file list will become

"FileList"="*.tif|*.tiff"

For the path if you just want to specify a hard coded name just type it -
the above numbers are how regedit exports text in a special format that
converts %windir% to c:\windows. In Regedit you will see it as text.

"Folder"="c:\tempscan"

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much for your suggestion but If you can put it in step wise
then
it will be little easier for me. say for example, my scanner uses a temp
folder c:\tempscan and it keeps on growing as i keep on scanning images.
now
what I want is the I want to extend the windows inbuild disk cleanup
utility
to include this folder as well. Please guide me step wise to do this. so
that following the steps I can add any number of folders into the disk
cleanup utility which will save lot of time.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
You can extend the inbuilt cleaner.

Here's one I just made that does *.fred in c:\desktop if more than 2 days
since last accessed.
Merge the file then look here in the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter
and alter the path and filetype (I didn't want to delete my hard drive by
mistake as 98 disk cleanup threatened to do if you customised
parameters).
Also as the path is an Expand type it's in hex in the regfile and in
english
in the reg (because regfiles don't support expand so it uses hex). If
using
environmental variables the data type must be expand.

I created a file called New Text Document.Fred, set my clock forward, and
it
deleted. It didn't delete unless I set the clock forward so it shows the
time is working (note it is last access not modified or created).

To use
cleanmgr /sageset:<a number>
and only tick the Customer Deleter
This sets it up

Then to run or schedule
cleanmgr /sagerun:<same number used above>

You can have as many pairs of sageset/run as you want.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

To make multiple cleaners just change the last key name (CustomDeleter)

Seperate multiple filetypes like so (pipe)
*.fred|*.horse

Seperate multiple directories the same way.
c:\desktop|C:\games

Use this syntax for directories ?:\recycled

Which will do all drives or the specified drive (depending on how cleanup
is
being used)

Last Access can be set to 0 for instant deleting.

AFAIK Disk Cleanup won't delete user data only IE's cache. There is more
there than IE's cache.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi,

I want to add a few more folders into the windows xp disk cleanup
utility.
The utility already have, Downloaded Program Files, Temporary Internet
Files, Recycle Bin, Temporary files, WebClient/Publisher Temporary
Files,
Compress old files, Catalog files for the content indexer. Now I want to
add
a few more folders for cleaning like prefetch, cookies, and some other
temp
folders which I use. Is it possible to add a few folders into the
diskcleanup utility of windows xp? if yes please let me know how. if it
can
be customized then it will be of great help to users like us.

Regards,
Ravi Verma
 
D

David Candy

Don't give up either, read the flags.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Ha ha ha, Hey David Thnx very much for your concern, ur really a jem of a
guy. Whatever u said it absolutely true, but when u get to know my situation
then I hope u will understand.
I have a small tech support company, a very small and a new company. It is
consist of three staffs, myself, and two other guys with very little, almost
nil computer knowledge. I use them for maintenance works and other
non-technical works. so I want to create some customization in windows so
that they can easily perform the maintenance and system restore jobs. I have
also managed to clone the c drive of all my clients with data directories
redirected in d drive, like my document and other data folders, I don't
allow my clients to keep any file on c drive. so that if any software
problem or virus problem occurs, my boys can go and simple restore the c
drive. without needing to do anything else. right now everything is fine but
the only problem is wiht outlook, i want to change the mail directory,
addressbook and all other settings to d drive, i m working on it, lets c
when i will get success.

Regards,
Ravi Verma

"David Candy" <.> wrote in message
C:\\WINDOWS\\Temporary Internet Files
Why are you doing this? This is not the way to do it. It has it's own
program to clear it correctly.

C:\windows\temp has it's own cleaner.

"Flags"=dword:00000000

Flags aren't set.

My role here is to teach not solve your problem. I've given you all the
information you need. So I'll repeat READ THE FLAGS. You have to do your own
assignments - assignments aren't for assesment but is when learning actually
takes place, marks are just the motivation to make you do it with genuine
effort (although I won't be marking you). It's when theory is turned into
practice.

So your next post I'll expect questions about FLAGS and what you think you
should do with them.

You do realise it is far quicker to do it by hand. I don't use Disk Cleanup
at all. It takes me 5 secs to clean my computer.
1. Type %temp% in Start Run (and as SR remembers I only type it the first
time)
2. Ctrl + A
3 Press Delete
4. Repeat above very rarely with Temp rather than %Temp%. Temp is used when
noone is logged in and is usually empty as usually nothing runs. Setup progs
that require a reboot to install (as opposed to needing a reboot after
installing) sometimes use it.
5. R/C Internet Icon - Properties - Delete Files and tick Offline Content -
Ok
6 R/C Recycle Bin - Empty Recycle Bin

There is nothing else worth cleaning.

I'm concerned with your attitude of wanting to delete everything.
--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

I have modified the clean.reg file and now it looks like this but still the
subfolders are not getting deleted.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Temp Scan"
"Description"="Clears a custom folder."
"Folder"="c:\\tempscan|c:\\windows\\temp|C:\\WINDOWS\\Temporary Internet
Files|D:\\Documents and Settings\\ravi\\Cookies"
"FileList"="*.*"
"Flags"=dword:00000000
"StateFlags"=dword:00000001
"DDEVCF_REMOVEDIRS"=dword:00000040

Regards,
Ravi Verma
"David Candy" <.> wrote in message
There is a flag for that so dirs are incl with files.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

Yes last access is two days that means I can delete the folder by using disk
cleanup after two days of last access. Now one more thing I want to know
regarding subfolders, my scanner creates some temp folders automatically
under c:\tempscan and disk cleanup is not being able to delete those
subfolders. I want to delete those subfolders but I cannot give the folder
name because my scanner creates some random folder name. If delete those
folders is not possible then I would like to know if the contents of those
folders can be emptied or not.
In short, I want to know:
1. Deleting subfolders who name I can't guess.
2. Deleting contents(files) of subfolders(it can be deeper ie
mainfolder\subfolder\subfolder\....contents) again the subfolders whose name
I can't guess. I just want to delete the contents(files) of the randomly
created subfolders.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
Remember last access is two days.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

There is an interesting finding. I changed the directory to
D:\WINDOWS\Prefetch in my clean.reg file and disk cleanup utility showed
135KB data. The ran disk cleanup and then checked the prefetch folder,
everything was there, nothing was deleted. I then again started disk cleanup
utility and this time I noticed the in Prefetch folder disk cleanup is
showing 0KB.

That means according to disk cleanup, everything in the folder is deleted
but in reality nothing is deleted.
David, I think there is some problem in the registry setting in our
clean.reg file, please check it for me and verify if everything is correct.

I am pasting the lastest clean.reg file for you.
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\E

xplorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Prefetch"
"Description"="Clears a custom folder."
"LastAccess"=dword:00000002
"Folder"="D:\\WINDOWS\\Prefetch"
"FileList"="*.*"
"Flags"=dword:00000000
"StateFlags"=dword:00000001

Chances are that @, LastAccess, Flags, StateFlags, out of these someone is
incorrect.

Please check, I will keep on trying till I succeed.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
When using backslashes you must use 2 for 1.

"Folder"="C:\\tempscan"

So folder wasn't merged. Why aren't you reading regedit.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ok thanx, now My clean.reg file is like this:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

On double clicking on the clean.reg file, now it got added to the registry.
Everthing is fine. I then restarted my computer and then changed the
computer time to 20 April 2006. But still the files in my c:\tempscan are
there they didn't got erased.

Regards,
Ravi verma
"David Candy" <.> wrote in message
You still need to run disk cleanup. I don't know what hold your folders
mean, I've told you already how to do multiple folders and also how to do
sub folders. If you want to know what 5 puts there export a reg file. It's
too long to type. REGEDIT4 is easier.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
you mean it automatically deletes the files? no need to run disk clean up
utility? that will be better but I would still like to know if I can extend
the diskcleanup utility to hold my folders too.?
Note: My registry version is 5 so should i put
REGEDIT5 on top of the file?
Regards,
Ravi
"David Candy" <.> wrote in message
A Reg file has one of two lines at the top. For this file

REGEDIT4

will do. The newer one, which we aren't using any new features from, has
some super long string. Export a regfile to see. It will also work on older
OSs unlike the new one.

So this file deletes files with a last access date of 2 days, which aren't
read only or system?

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

I am very much interested in knowing about the flags. to be frank at present
I can't get what you have typed. anyways, right now my clean.reg file looks
like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

But when I double click on clean.reg file a message is displayed after
clicking yes to the normal message. it says:
"Cannot import D:\Documents and Settings\ravi\My Documents\clean.reg: The
specified file is not a registry script. You can only import binary registry
files from withing the registry editor."

it there some format for writing registry script? I will look it in google
if there is any, I typed here because it was important to keep you posted.

Regards,
Ravi


"David Candy" <.> wrote in message
Yes and yes. But you may want to reconsider *.* unless you know that no
other files are in or will ever be in that folder. Automate as little as
possible.

Here are the flags if you are interested.
FlagsREG_DWORD or REG_BINARYFlags controlling elements of the search and
cleaning procedure. One or more of the following values. FlagValueMeaning
DDEVCF_DOSUBDIRS0x00000001Search and remove recursively.
DDEVCF_REMOVEAFTERCLEAN0x00000002After the handler is run once, remove it
from the registry.
DDEVCF_REMOVEREADONLY0x00000004Remove files that meet the search criteria
even if they are read-only.
DDEVCF_REMOVESYSTEM0x00000008Remove files that meet the search criteria even
if they are system files.
DDEVCF_REMOVEHIDDEN0x00000010Remove files that meet the search criteria even
if they are hidden files.
DDEVCF_DONTSHOWIFZERO0x00000020Do not display this handler in the disk
cleanup manager if no files match its search criteria.
DDEVCF_REMOVEDIRS0x00000040Match the FileList value against directories and
remove matches and all of their subdirectories.
DDEVCF_RUNIFOUTOFDISKSPACE0x00000080Run this handler only if available disk
space has fallen below the critical value, determined by the disk cleanup
manager setting the EVCF_OUTOFDISKSPACE flag through
IEmptyVolumeCache::Initialize or IEmptyVolumeCache2::InitializeEx.
DDEVCF_REMOVEPARENTDIR0x00000100Remove the parent directory of the specified
files once the cleaner has run.
DDEVCF_PRIVATE_LASTACCESS0x10000000Use the LastAccess value, if provided, in
ascertaining which files should be cleaned. This flag is ignored when using
the DataDrivenCleaner—any provided LastAccess value is always used.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much now my file looks like this.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Cu

stomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.jpg|*.bmp"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

Now, I have two questions:
1. can i save this text file into reg file like clean.reg and double click
on the file. will that add these entries into the registry?
2. Can I use "FileList"="*.*" ?

Regards,
Ravi Verma
now I have two questions to ask,
"David Candy" <.> wrote in message
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

You put above in a text file and edit the fields,
Firstly what files do you want to delete. Lets assume your scanner does
TIF
files. Lets also say that you edit the TIF files with paint and save some
as
TIFF. So file list will become

"FileList"="*.tif|*.tiff"

For the path if you just want to specify a hard coded name just type it -
the above numbers are how regedit exports text in a special format that
converts %windir% to c:\windows. In Regedit you will see it as text.

"Folder"="c:\tempscan"

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much for your suggestion but If you can put it in step wise
then
it will be little easier for me. say for example, my scanner uses a temp
folder c:\tempscan and it keeps on growing as i keep on scanning images.
now
what I want is the I want to extend the windows inbuild disk cleanup
utility
to include this folder as well. Please guide me step wise to do this. so
that following the steps I can add any number of folders into the disk
cleanup utility which will save lot of time.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
You can extend the inbuilt cleaner.

Here's one I just made that does *.fred in c:\desktop if more than 2 days
since last accessed.
Merge the file then look here in the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter
and alter the path and filetype (I didn't want to delete my hard drive by
mistake as 98 disk cleanup threatened to do if you customised
parameters).
Also as the path is an Expand type it's in hex in the regfile and in
english
in the reg (because regfiles don't support expand so it uses hex). If
using
environmental variables the data type must be expand.

I created a file called New Text Document.Fred, set my clock forward, and
it
deleted. It didn't delete unless I set the clock forward so it shows the
time is working (note it is last access not modified or created).

To use
cleanmgr /sageset:<a number>
and only tick the Customer Deleter
This sets it up

Then to run or schedule
cleanmgr /sagerun:<same number used above>

You can have as many pairs of sageset/run as you want.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

To make multiple cleaners just change the last key name (CustomDeleter)

Seperate multiple filetypes like so (pipe)
*.fred|*.horse

Seperate multiple directories the same way.
c:\desktop|C:\games

Use this syntax for directories ?:\recycled

Which will do all drives or the specified drive (depending on how cleanup
is
being used)

Last Access can be set to 0 for instant deleting.

AFAIK Disk Cleanup won't delete user data only IE's cache. There is more
there than IE's cache.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi,

I want to add a few more folders into the windows xp disk cleanup
utility.
The utility already have, Downloaded Program Files, Temporary Internet
Files, Recycle Bin, Temporary files, WebClient/Publisher Temporary
Files,
Compress old files, Catalog files for the content indexer. Now I want to
add
a few more folders for cleaning like prefetch, cookies, and some other
temp
folders which I use. Is it possible to add a few folders into the
diskcleanup utility of windows xp? if yes please let me know how. if it
can
be customized then it will be of great help to users like us.

Regards,
Ravi Verma
 
R

Ravi Verma

Thanks very much for the registry help from extending the diskcleanup
utility. I think rest depends on my reading, which i will do in any case, I
think we should now close this conversation and start new on another topic.

Its been great support from you.
Regards,
Ravi Verma
"David Candy" <.> wrote in message
Don't give up either, read the flags.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Ha ha ha, Hey David Thnx very much for your concern, ur really a jem of a
guy. Whatever u said it absolutely true, but when u get to know my
situation
then I hope u will understand.
I have a small tech support company, a very small and a new company. It is
consist of three staffs, myself, and two other guys with very little,
almost
nil computer knowledge. I use them for maintenance works and other
non-technical works. so I want to create some customization in windows so
that they can easily perform the maintenance and system restore jobs. I
have
also managed to clone the c drive of all my clients with data directories
redirected in d drive, like my document and other data folders, I don't
allow my clients to keep any file on c drive. so that if any software
problem or virus problem occurs, my boys can go and simple restore the c
drive. without needing to do anything else. right now everything is fine
but
the only problem is wiht outlook, i want to change the mail directory,
addressbook and all other settings to d drive, i m working on it, lets c
when i will get success.

Regards,
Ravi Verma

"David Candy" <.> wrote in message
C:\\WINDOWS\\Temporary Internet Files
Why are you doing this? This is not the way to do it. It has it's own
program to clear it correctly.

C:\windows\temp has it's own cleaner.

"Flags"=dword:00000000

Flags aren't set.

My role here is to teach not solve your problem. I've given you all the
information you need. So I'll repeat READ THE FLAGS. You have to do your
own
assignments - assignments aren't for assesment but is when learning
actually
takes place, marks are just the motivation to make you do it with genuine
effort (although I won't be marking you). It's when theory is turned into
practice.

So your next post I'll expect questions about FLAGS and what you think you
should do with them.

You do realise it is far quicker to do it by hand. I don't use Disk
Cleanup
at all. It takes me 5 secs to clean my computer.
1. Type %temp% in Start Run (and as SR remembers I only type it the first
time)
2. Ctrl + A
3 Press Delete
4. Repeat above very rarely with Temp rather than %Temp%. Temp is used
when
noone is logged in and is usually empty as usually nothing runs. Setup
progs
that require a reboot to install (as opposed to needing a reboot after
installing) sometimes use it.
5. R/C Internet Icon - Properties - Delete Files and tick Offline
Content -
Ok
6 R/C Recycle Bin - Empty Recycle Bin

There is nothing else worth cleaning.

I'm concerned with your attitude of wanting to delete everything.
--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

I have modified the clean.reg file and now it looks like this but still
the
subfolders are not getting deleted.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Temp Scan"
"Description"="Clears a custom folder."
"Folder"="c:\\tempscan|c:\\windows\\temp|C:\\WINDOWS\\Temporary Internet
Files|D:\\Documents and Settings\\ravi\\Cookies"
"FileList"="*.*"
"Flags"=dword:00000000
"StateFlags"=dword:00000001
"DDEVCF_REMOVEDIRS"=dword:00000040

Regards,
Ravi Verma
"David Candy" <.> wrote in message
There is a flag for that so dirs are incl with files.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

Yes last access is two days that means I can delete the folder by using
disk
cleanup after two days of last access. Now one more thing I want to know
regarding subfolders, my scanner creates some temp folders automatically
under c:\tempscan and disk cleanup is not being able to delete those
subfolders. I want to delete those subfolders but I cannot give the folder
name because my scanner creates some random folder name. If delete those
folders is not possible then I would like to know if the contents of those
folders can be emptied or not.
In short, I want to know:
1. Deleting subfolders who name I can't guess.
2. Deleting contents(files) of subfolders(it can be deeper ie
mainfolder\subfolder\subfolder\....contents) again the subfolders whose
name
I can't guess. I just want to delete the contents(files) of the randomly
created subfolders.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
Remember last access is two days.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

There is an interesting finding. I changed the directory to
D:\WINDOWS\Prefetch in my clean.reg file and disk cleanup utility showed
135KB data. The ran disk cleanup and then checked the prefetch folder,
everything was there, nothing was deleted. I then again started disk
cleanup
utility and this time I noticed the in Prefetch folder disk cleanup is
showing 0KB.

That means according to disk cleanup, everything in the folder is deleted
but in reality nothing is deleted.
David, I think there is some problem in the registry setting in our
clean.reg file, please check it for me and verify if everything is
correct.

I am pasting the lastest clean.reg file for you.
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\E

xplorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Prefetch"
"Description"="Clears a custom folder."
"LastAccess"=dword:00000002
"Folder"="D:\\WINDOWS\\Prefetch"
"FileList"="*.*"
"Flags"=dword:00000000
"StateFlags"=dword:00000001

Chances are that @, LastAccess, Flags, StateFlags, out of these someone is
incorrect.

Please check, I will keep on trying till I succeed.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
When using backslashes you must use 2 for 1.

"Folder"="C:\\tempscan"

So folder wasn't merged. Why aren't you reading regedit.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ok thanx, now My clean.reg file is like this:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

On double clicking on the clean.reg file, now it got added to the
registry.
Everthing is fine. I then restarted my computer and then changed the
computer time to 20 April 2006. But still the files in my c:\tempscan are
there they didn't got erased.

Regards,
Ravi verma
"David Candy" <.> wrote in message
You still need to run disk cleanup. I don't know what hold your folders
mean, I've told you already how to do multiple folders and also how to do
sub folders. If you want to know what 5 puts there export a reg file. It's
too long to type. REGEDIT4 is easier.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
you mean it automatically deletes the files? no need to run disk clean up
utility? that will be better but I would still like to know if I can
extend
the diskcleanup utility to hold my folders too.?
Note: My registry version is 5 so should i put
REGEDIT5 on top of the file?
Regards,
Ravi
"David Candy" <.> wrote in message
A Reg file has one of two lines at the top. For this file

REGEDIT4

will do. The newer one, which we aren't using any new features from, has
some super long string. Export a regfile to see. It will also work on
older
OSs unlike the new one.

So this file deletes files with a last access date of 2 days, which aren't
read only or system?

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

I am very much interested in knowing about the flags. to be frank at
present
I can't get what you have typed. anyways, right now my clean.reg file
looks
like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

But when I double click on clean.reg file a message is displayed after
clicking yes to the normal message. it says:
"Cannot import D:\Documents and Settings\ravi\My Documents\clean.reg: The
specified file is not a registry script. You can only import binary
registry
files from withing the registry editor."

it there some format for writing registry script? I will look it in google
if there is any, I typed here because it was important to keep you posted.

Regards,
Ravi


"David Candy" <.> wrote in message
Yes and yes. But you may want to reconsider *.* unless you know that no
other files are in or will ever be in that folder. Automate as little as
possible.

Here are the flags if you are interested.
FlagsREG_DWORD or REG_BINARYFlags controlling elements of the search and
cleaning procedure. One or more of the following values. FlagValueMeaning
DDEVCF_DOSUBDIRS0x00000001Search and remove recursively.
DDEVCF_REMOVEAFTERCLEAN0x00000002After the handler is run once, remove it
from the registry.
DDEVCF_REMOVEREADONLY0x00000004Remove files that meet the search criteria
even if they are read-only.
DDEVCF_REMOVESYSTEM0x00000008Remove files that meet the search criteria
even
if they are system files.
DDEVCF_REMOVEHIDDEN0x00000010Remove files that meet the search criteria
even
if they are hidden files.
DDEVCF_DONTSHOWIFZERO0x00000020Do not display this handler in the disk
cleanup manager if no files match its search criteria.
DDEVCF_REMOVEDIRS0x00000040Match the FileList value against directories
and
remove matches and all of their subdirectories.
DDEVCF_RUNIFOUTOFDISKSPACE0x00000080Run this handler only if available
disk
space has fallen below the critical value, determined by the disk cleanup
manager setting the EVCF_OUTOFDISKSPACE flag through
IEmptyVolumeCache::Initialize or IEmptyVolumeCache2::InitializeEx.
DDEVCF_REMOVEPARENTDIR0x00000100Remove the parent directory of the
specified
files once the cleaner has run.
DDEVCF_PRIVATE_LASTACCESS0x10000000Use the LastAccess value, if provided,
in
ascertaining which files should be cleaned. This flag is ignored when
using
the DataDrivenCleaner—any provided LastAccess value is always used.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much now my file looks like this.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Cu

stomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.jpg|*.bmp"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

Now, I have two questions:
1. can i save this text file into reg file like clean.reg and double
click
on the file. will that add these entries into the registry?
2. Can I use "FileList"="*.*" ?

Regards,
Ravi Verma
now I have two questions to ask,
"David Candy" <.> wrote in message
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

You put above in a text file and edit the fields,
Firstly what files do you want to delete. Lets assume your scanner does
TIF
files. Lets also say that you edit the TIF files with paint and save some
as
TIFF. So file list will become

"FileList"="*.tif|*.tiff"

For the path if you just want to specify a hard coded name just type it -
the above numbers are how regedit exports text in a special format that
converts %windir% to c:\windows. In Regedit you will see it as text.

"Folder"="c:\tempscan"

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much for your suggestion but If you can put it in step wise
then
it will be little easier for me. say for example, my scanner uses a temp
folder c:\tempscan and it keeps on growing as i keep on scanning images.
now
what I want is the I want to extend the windows inbuild disk cleanup
utility
to include this folder as well. Please guide me step wise to do this. so
that following the steps I can add any number of folders into the disk
cleanup utility which will save lot of time.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
You can extend the inbuilt cleaner.

Here's one I just made that does *.fred in c:\desktop if more than 2
days
since last accessed.
Merge the file then look here in the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter
and alter the path and filetype (I didn't want to delete my hard drive
by
mistake as 98 disk cleanup threatened to do if you customised
parameters).
Also as the path is an Expand type it's in hex in the regfile and in
english
in the reg (because regfiles don't support expand so it uses hex). If
using
environmental variables the data type must be expand.

I created a file called New Text Document.Fred, set my clock forward,
and
it
deleted. It didn't delete unless I set the clock forward so it shows the
time is working (note it is last access not modified or created).

To use
cleanmgr /sageset:<a number>
and only tick the Customer Deleter
This sets it up

Then to run or schedule
cleanmgr /sagerun:<same number used above>

You can have as many pairs of sageset/run as you want.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

To make multiple cleaners just change the last key name (CustomDeleter)

Seperate multiple filetypes like so (pipe)
*.fred|*.horse

Seperate multiple directories the same way.
c:\desktop|C:\games

Use this syntax for directories ?:\recycled

Which will do all drives or the specified drive (depending on how
cleanup
is
being used)

Last Access can be set to 0 for instant deleting.

AFAIK Disk Cleanup won't delete user data only IE's cache. There is more
there than IE's cache.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi,

I want to add a few more folders into the windows xp disk cleanup
utility.
The utility already have, Downloaded Program Files, Temporary Internet
Files, Recycle Bin, Temporary files, WebClient/Publisher Temporary
Files,
Compress old files, Catalog files for the content indexer. Now I want
to
add
a few more folders for cleaning like prefetch, cookies, and some other
temp
folders which I use. Is it possible to add a few folders into the
diskcleanup utility of windows xp? if yes please let me know how. if it
can
be customized then it will be of great help to users like us.

Regards,
Ravi Verma
 
R

Ravi Verma

Sorry to post again on this topic, But I have posted this only to thank David. It was great, the latest version of clean.reg is working and its great. Wonderful.

Thanks very much David. It was great being with you in this discussion. I hope we will be in touch in future discussions.

Regards,
Ravi Verma
Hi David,

I don't read because I don't understand what I read, lol. To be frank, I am not an expert like you who understands everything. Anyways, now I have made changes to my clean.reg file:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Tempscan"
"Description"="Clears a custom folder"

Then I restarted my computer, and started disk cleanup, the folder tempscan is visible in disk cleanup but still it is showing 0KB, still I ran the utility and show nothing happened. Where am I wrong? if you want me to read a registry file then pls let me know which one should I export?

Regards,
Ravi Verma
"David Candy" <.> wrote in message When using backslashes you must use 2 for 1.

"Folder"="C:\\tempscan"

So folder wasn't merged. Why aren't you reading regedit.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ok thanx, now My clean.reg file is like this:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

On double clicking on the clean.reg file, now it got added to the registry. Everthing is fine. I then restarted my computer and then changed the computer time to 20 April 2006. But still the files in my c:\tempscan are there they didn't got erased.

Regards,
Ravi verma
"David Candy" <.> wrote in message You still need to run disk cleanup. I don't know what hold your folders mean, I've told you already how to do multiple folders and also how to do sub folders. If you want to know what 5 puts there export a reg file. It's too long to type. REGEDIT4 is easier.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
you mean it automatically deletes the files? no need to run disk clean up utility? that will be better but I would still like to know if I can extend the diskcleanup utility to hold my folders too.?
Note: My registry version is 5 so should i put
REGEDIT5 on top of the file?
Regards,
Ravi
"David Candy" <.> wrote in message A Reg file has one of two lines at the top. For this file

REGEDIT4

will do. The newer one, which we aren't using any new features from, has some super long string. Export a regfile to see. It will also work on older OSs unlike the new one.

So this file deletes files with a last access date of 2 days, which aren't read only or system?

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Hi David,

I am very much interested in knowing about the flags. to be frank at present I can't get what you have typed. anyways, right now my clean.reg file looks like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.*"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

But when I double click on clean.reg file a message is displayed after clicking yes to the normal message. it says:
"Cannot import D:\Documents and Settings\ravi\My Documents\clean.reg: The specified file is not a registry script. You can only import binary registry files from withing the registry editor."

it there some format for writing registry script? I will look it in google if there is any, I typed here because it was important to keep you posted.

Regards,
Ravi


"David Candy" <.> wrote in message Yes and yes. But you may want to reconsider *.* unless you know that no other files are in or will ever be in that folder. Automate as little as possible.

Here are the flags if you are interested.
Flags REG_DWORD or REG_BINARY Flags controlling elements of the search and cleaning procedure. One or more of the following values. Flag Value Meaning
DDEVCF_DOSUBDIRS 0x00000001 Search and remove recursively.
DDEVCF_REMOVEAFTERCLEAN 0x00000002 After the handler is run once, remove it from the registry.
DDEVCF_REMOVEREADONLY 0x00000004 Remove files that meet the search criteria even if they are read-only.
DDEVCF_REMOVESYSTEM 0x00000008 Remove files that meet the search criteria even if they are system files.
DDEVCF_REMOVEHIDDEN 0x00000010 Remove files that meet the search criteria even if they are hidden files.
DDEVCF_DONTSHOWIFZERO 0x00000020 Do not display this handler in the disk cleanup manager if no files match its search criteria.
DDEVCF_REMOVEDIRS 0x00000040 Match the FileList value against directories and remove matches and all of their subdirectories.
DDEVCF_RUNIFOUTOFDISKSPACE 0x00000080 Run this handler only if available disk space has fallen below the critical value, determined by the disk cleanup manager setting the EVCF_OUTOFDISKSPACE flag through IEmptyVolumeCache::Initialize or IEmptyVolumeCache2::InitializeEx.
DDEVCF_REMOVEPARENTDIR 0x00000100 Remove the parent directory of the specified files once the cleaner has run.
DDEVCF_PRIVATE_LASTACCESS 0x10000000 Use the LastAccess value, if provided, in ascertaining which files should be cleaned. This flag is ignored when using the DataDrivenCleaner—any provided LastAccess value is always used.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much now my file looks like this.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Cu

stomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.jpg|*.bmp"
"Folder"="C:\tempscan"
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

Now, I have two questions:
1. can i save this text file into reg file like clean.reg and double click
on the file. will that add these entries into the registry?
2. Can I use "FileList"="*.*" ?

Regards,
Ravi Verma
now I have two questions to ask,
"David Candy" <.> wrote in message
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

You put above in a text file and edit the fields,
Firstly what files do you want to delete. Lets assume your scanner does TIF
files. Lets also say that you edit the TIF files with paint and save some as
TIFF. So file list will become

"FileList"="*.tif|*.tiff"

For the path if you just want to specify a hard coded name just type it -
the above numbers are how regedit exports text in a special format that
converts %windir% to c:\windows. In Regedit you will see it as text.

"Folder"="c:\tempscan"

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Thanks very much for your suggestion but If you can put it in step wise
then
it will be little easier for me. say for example, my scanner uses a temp
folder c:\tempscan and it keeps on growing as i keep on scanning images.
now
what I want is the I want to extend the windows inbuild disk cleanup
utility
to include this folder as well. Please guide me step wise to do this. so
that following the steps I can add any number of folders into the disk
cleanup utility which will save lot of time.

Regards,
Ravi Verma
"David Candy" <.> wrote in message
You can extend the inbuilt cleaner.

Here's one I just made that does *.fred in c:\desktop if more than 2 days
since last accessed.
Merge the file then look here in the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter
and alter the path and filetype (I didn't want to delete my hard drive by
mistake as 98 disk cleanup threatened to do if you customised parameters).
Also as the path is an Expand type it's in hex in the regfile and in
english
in the reg (because regfiles don't support expand so it uses hex). If
using
environmental variables the data type must be expand.

I created a file called New Text Document.Fred, set my clock forward, and
it
deleted. It didn't delete unless I set the clock forward so it shows the
time is working (note it is last access not modified or created).

To use
cleanmgr /sageset:<a number>
and only tick the Customer Deleter
This sets it up

Then to run or schedule
cleanmgr /sagerun:<same number used above>

You can have as many pairs of sageset/run as you want.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\CustomDeleter]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"FileList"="*.fred"
"Folder"=hex(2):63,00,3a,00,5c,00,64,00,65,00,73,00,6b,00,74,00,6f,00,70,00,00,\
00
"Flags"=dword:00000000
"LastAccess"=dword:00000002
"StateFlags"=dword:00000001
"Display"="Custom"
"Description"="Clears a custom folder"

To make multiple cleaners just change the last key name (CustomDeleter)

Seperate multiple filetypes like so (pipe)
*.fred|*.horse

Seperate multiple directories the same way.
c:\desktop|C:\games

Use this syntax for directories ?:\recycled

Which will do all drives or the specified drive (depending on how cleanup
is
being used)

Last Access can be set to 0 for instant deleting.

AFAIK Disk Cleanup won't delete user data only IE's cache. There is more
there than IE's cache.


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Ravi Verma said:
Hi,

I want to add a few more folders into the windows xp disk cleanup
utility.
The utility already have, Downloaded Program Files, Temporary Internet
Files, Recycle Bin, Temporary files, WebClient/Publisher Temporary Files,
Compress old files, Catalog files for the content indexer. Now I want to
add
a few more folders for cleaning like prefetch, cookies, and some other
temp
folders which I use. Is it possible to add a few folders into the
diskcleanup utility of windows xp? if yes please let me know how. if it
can
be customized then it will be of great help to users like us.

Regards,
Ravi Verma
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Windows xP cleanup (slow running) 5
Disk cleanup 1
Website won't go away 2
Disk Cleanup Utility 1
disk cleanup problem 1
disk cleanup problem 2
Disk Cleanup Extremely Slow 9
Making Space and cleaning house 3

Top