Customization of Disk Cleanup

R

Ravi Verma

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

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.
 
R

Ravi Verma

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.
 
D

David Candy

[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

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
 
R

Ravi Verma

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

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
 
R

Ravi Verma

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
 
R

Ravi Verma

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

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
 
R

Ravi Verma

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

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

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
 
R

Ravi Verma

Hi David,

Everything looks fine, The folder got into DiskCleanup utility. everything is fine, I had two txt files in the c:\tempscan folder. The ran the disk cleanup utility for c: drive, selected the custom option in the disk cleanup. But still no file is deleted. though diskcleanup shows that i have 0KB in custom folder, but in reality the files are still there in the c:\tempscan folder.

Regards,
Ravi
"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
 
R

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
 
R

Ravi Verma

Hi David,

I have read all the registry keys under VolumeCache and changed my clean.reg file. Now the file looks like this:
Windows Registry Editor Version 5.00

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

Still same problem. Diskcleanup still showing Tempscan with 0KB. when I have stored 5 files into the C:\tempscan directory.

Please tell me what else can I do?

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
 
R

Ravi Verma

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

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
 
R

Ravi Verma

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

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
 

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