Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista file management

Vista - Deleting Vista Search Folders

Reply
 
Old 03-04-2008   #11 (permalink)
Keith Miller \(MVP\)


 
 

Re: Deleting Vista Search Folders

"pvc" <pvc.35rc9z@xxxxxx-mx.forums.net> wrote in message
newsvc.35rc9;z@xxxxxx-mx.forums.net...
Quote:

>
>
> My automated cleanup script is working well, thanks to your help.
> Perhaps you can help me with automating the task of deleting the
> contents of this folder (C:\Users\myname\Recent). I can deleted the
> contents manually, but I am having trouble finding an automated
> solution.
> Dan
>
'C:\Users\<UserName>\Recent'

is a Junction Point that points the the folder:

'C:\Users\<UserName>\AppData\Roaming\Microsoft\Windows\Recent'

So try a 'del *.*' on that.


--
Good Luck,

Keith
Microsoft MVP [Windows Shell/User]




My System SpecsSystem Spec
Old 03-04-2008   #12 (permalink)
Bob


 
 

Re: Deleting Vista Search Folders


"pvc" <pvc.35rc9z@xxxxxx-mx.forums.net> wrote in message
Quote:

> My automated cleanup script is working well, thanks to your help.
> Perhaps you can help me with automating the task of deleting the
> contents of this folder (C:\Users\myname\Recent). I can deleted the
> contents manually, but I am having trouble finding an automated
> solution.
> Dan
Create a batch file.
del /y C:\Users\Dan\Recent\*.*

My System SpecsSystem Spec
Old 03-04-2008   #13 (permalink)
pvc


Vista Home Premium 64bit
 
 

Re: Deleting Vista Search Folders

Thanks again (Bob, I did that); I ended up with the following command (.cmd) file (see below). I will also look into using the Task Scheduler for further automation instead of using the Run command.

PLEASE NOTE: I do not recommend this if you are using Indexing for Search! I have my indexing set to index nothing (no files, no folders, no disks).
----------
REM
REM Searches
REM
DEL C:\Users\Dan\Searches\*.search-ms
DEL /ahr C:\Users\Dan\Searches\*.search-ms
REM
REM Saved Games
REM
DEL C:\Users\Dan\Saved Games\Microsoft Games\Hearts\*.*ms
DEL C:\Users\Dan\Saved Games\Microsoft Games\Purple Place\*.*ms
DEL C:\Users\Dan\Saved Games\Microsoft Games\Spider Solitare\*.*ms
DEL C:\Users\Dan\Saved Games\Microsoft Games\Chess Titans\*.*ms
DEL C:\Users\Dan\Saved Games\Microsoft Games\FreeCell\*.*ms
DEL C:\Users\Dan\Saved Games\Microsoft Games\InkBall\*.*ms
DEL C:\Users\Dan\Saved Games\Microsoft Games\Mahjong Titans\*.*ms
DEL C:\Users\Dan\Saved Games\Microsoft Games\Minesweeper\*.*ms
DEL C:\Users\Dan\Saved Games\Microsoft Games\Solitare\*.*ms
REM
REM Recent
REM
ECHO Y|DEL C:\Users\Dan\AppData\Roaming\Microsoft\office\Recent
DEL C:\Users\Dan\AppData\Roaming\Microsoft\Windows\Recent\*.*.*
My System SpecsSystem Spec
Old 03-04-2008   #14 (permalink)
Bob


 
 

Re: Deleting Vista Search Folders

Place the bat file in c:\

"pvc" <pvc.35rjx1@xxxxxx-mx.forums.net> wrote in message
newsvc.35rjx1@xxxxxx-mx.forums.net...
Quote:

>
> Thanks again (Bob, I did that); I ended up with the following command
> (.cmd) file (see below). I will also look into using the Task Scheduler
> for further automation instead of using the Run command.
>
> PLEASE NOTE: I do not recommend this if you are using Indexing for
> Search! I have my indexing set to index nothing (no files, no folders,
> no disks).
> ----------
> REM
> REM Searches
> REM
> DEL C:\Users\Dan\Searches\*.search-ms
> DEL /ahr C:\Users\Dan\Searches\*.search-ms
> REM
> REM Saved Games
> REM
> DEL C:\Users\Dan\Saved Games\Microsoft Games\Hearts\*.*ms
> DEL C:\Users\Dan\Saved Games\Microsoft Games\Purple Place\*.*ms
> DEL C:\Users\Dan\Saved Games\Microsoft Games\Spider Solitare\*.*ms
> DEL C:\Users\Dan\Saved Games\Microsoft Games\Chess Titans\*.*ms
> DEL C:\Users\Dan\Saved Games\Microsoft Games\FreeCell\*.*ms
> DEL C:\Users\Dan\Saved Games\Microsoft Games\InkBall\*.*ms
> DEL C:\Users\Dan\Saved Games\Microsoft Games\Mahjong Titans\*.*ms
> DEL C:\Users\Dan\Saved Games\Microsoft Games\Minesweeper\*.*ms
> DEL C:\Users\Dan\Saved Games\Microsoft Games\Solitare\*.*ms
> REM
> REM Recent
> REM
> ECHO Y|DEL C:\Users\Dan\AppData\Roaming\Microsoft\office\Recent
> DEL C:\Users\Dan\AppData\Roaming\Microsoft\Windows\Recent\*.*.*
>
>
> --
> pvc
My System SpecsSystem Spec
Old 03-04-2008   #15 (permalink)
pvc


Vista Home Premium 64bit
 
 

Re: Deleting Vista Search Folders

Quote  Quote: Originally Posted by Bob View Post
Place the bat file in c:\
I'm not sure what you mean by store it in c:\ ?
I store it in a place where I store my script commands. I used Task Scheduler to run it at Startup time, like this:

It works great for me. Click on the image for a larger view.
My System SpecsSystem Spec
Old 03-04-2008   #16 (permalink)
Bob


 
 

Re: Deleting Vista Search Folders

I mean the root directory of your PC.

"pvc" <pvc.35rs93@xxxxxx-mx.forums.net> wrote in message
newsvc.35rs93@xxxxxx-mx.forums.net...
Quote:

>
> Bob;634755 Wrote:
Quote:

>> Place the bat file in c:\
>>
>>
> I'm not sure what you mean by store it in c:\ ?
> I store it in a place where I store my script commands. I used Task
> Scheduler to run it at Startup time, like this:
> '[image:
> http://www.imagecraz.com/files/dbps9...n3g_thumb.jpg]'
> (http://www.imagecraz.com/viewer.php?...hlfakkon3g.jpg)
> It works great for me. Click on the image for a larger view.
>
>
> --
> pvc
My System SpecsSystem Spec
Old 03-25-2008   #17 (permalink)
pvc


Vista Home Premium 64bit
 
 

Re: Deleting Vista Search Folders

I am trying to delete the following file using an automated script (.cmd) file:

C:\Users\<UserName>\AppData\Local\Microsoft\Windows Photo Gallery\Pictures.pd4

I want to automate the task of deleting this file. I can delete the file manually, but I am having trouble deleting it from a script file or from the "Run\CMD" prompt.

Any suggestions?
Dan

Last edited by pvc; 03-25-2008 at 11:10 AM..
My System SpecsSystem Spec
Old 03-25-2008   #18 (permalink)
Bob


 
 

Re: Deleting Vista Search Folders


This works from a cmd prompt or a batch file.

attrib -r -a -s -h del [drive] path] [filename]
-------
*Report back, please*
[When responding to posts, please include the post(s) you are replying to so
that others may learn and benefit from the issue]

[How to ask a question]
http://support.microsoft.com/kb/555375

"pvc" <pvc.36u2q7@xxxxxx-mx.forums.net> wrote in message
newsvc.36u2q7@xxxxxx-mx.forums.net...
Quote:

>
> I am trying to delete the following file from an automated script (.cmd)
> file:
>
> C:\Users\<UserName>\AppData\Local\Microsoft\Windows Photo
> Gallery\Pictures.pd4
>
> I want to automate the task of deleting this file. I can delete the
> file manually, but I am having trouble deleting it from a script file or
> from the "Run\CMD" prompt.
>
> Any suggestions?
> Dan
>
>
> --
> pvc
My System SpecsSystem Spec
Old 03-25-2008   #19 (permalink)
pvc


Vista Home Premium 64bit
 
 

Re: Deleting Vista Search Folders

Quote  Quote: Originally Posted by Bob View Post
This works from a cmd prompt or a batch file.

attrib -r -a -s -h del [drive] path] [filename]
-------
*Report back, please*
Thanks Bob;
When I do a dir C:\Users\<UserName>\AppData\Local\Microsoft\Windows Photo Gallery I get a file not found. I can look at these files; dir C:\Users\<UserName>\AppData\Local\Microsoft but when I add the Windows Photo Gallery folder I get no access to the files.

I don't understand how to use attrib -r -a -s -h??? Can you show me the exact format?
My System SpecsSystem Spec
Old 03-25-2008   #20 (permalink)
pvc


Vista Home Premium 64bit
 
 

Re: Deleting Vista Search Folders

The following commands seems to work. Any way to accomplish this in one command?
Probably not because you must change the attributes of the file before deleting??

CD C:\Users\Dan\AppData\Local\Microsoft\Windows Photo Gallery
Attrib -r -a -s -h
DEL Pictures.pd4
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Deleting Search Results-Vista Vista General
Deleting remnants of a VISTA search General Discussion
Deleting old Vista folders Vista account administration
Search and deleting files in Vista Vista General
Deleting the Search Index in Vista Beta 2 Vista file management


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46