Hi David,
Just wondered is it possible to instruct cleanmgr to delete files older
thatn m days rather than based on last accessed?
thanks.
"David Candy" <.> wrote in message
news:e4o57Q1%(E-Mail Removed)...
What's wrong with disk cleanup. It does 7 days by default if doing the temp
but can be changed to do other folders.
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"
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. 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.
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.
--
--------------------------------------------------------------------------------------------------
Goodbye Web Diary
http://margokingston.typepad.com/har....html#comments
=================================================
"metafizik" <(E-Mail Removed)> wrote in message
news:A9EFCB25-7E87-41EA-AF0B-(E-Mail Removed)...
> Hi Marcus,
>
> We use a freeware utility called decay to purge files on one of the FTP
> servers where I work. It might be the tool you are looking for. I can't
> promise but it won't cost you anything to give it a shot. It can be found
> here: http://www.linkdata.se/software.html
>
> "Markus Mannheim" wrote:
>
>> Hi,
>>
>> on an ftp Server I am running a script which clears all files in
>> subfolders
>> of the users:
>>
>> :: Variablen
>> set datei=d:\scripte\folders.txt
>> set start=d:\ftp
>> set start2=ftp
>>
>> setlocal
>> d:
>> cd\
>> cd %start2%
>> dir /a:d /b >%datei%
>> FOR /F %%G IN (%datei%) DO (
>> cd %%G
>> pushd %start%\%%G%
>> cd\
>> cd %start2%\%%G%
>> for /F "tokens=1-3,* delims=\" %%A in ('dir /B /S /AD^|sort /R') do (
>> if "" NEQ "%%D" RD /Q /S "%%A\%%B\%%C\%%D")
>> del %start%\%%G%\*.* /q /f
>> copy d:\scripte\readme.txt ./y
>>
>> d:
>> cd\
>> cd %start2%
>> popd)
>> del %datei%
>> set start=
>> set start2=
>>
>> Now this script deletes all files whenever I run it via "Sheduled Tasks".
>> Because our users are working in different countries, the files should
>> remain for 24 hours, instead.
>> Some of you may have an idea how to read the date of a file and compare
>> it
>> with the actual date?
>>
>> For help thanks in advance,
>>
>> Markus
>>
>>
>>