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 > Misc Newsgroups > VB Script

Vista - Script to clean up Flash Player old files

Reply
 
Old 07-08-2009   #1 (permalink)
Rich


 
 

Script to clean up Flash Player old files

All my users Application Data folders are redirected to a file server.
Everyone has Flash installed in their IE, so when I do a robocopy every night
I end up copying all these pointless files back and forth between servers,
which makes the log files painfully hard to review when there are problems.
Is there a way in vbscript to have it delete all the files and folders under
the randomly generated name folders, as shown below. I substituted UserName
in the path below for what could really be one of a couple hundred user
names. The 6RS7BM4P could be any random grouping of letters and numbers also
from what I can tell.

d:\UserName\Application Data\Macromedia\Flash Player\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\anthropologie.com\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\as1.suitesmart.com\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\as1.suitesmart.com\_f5e.swf\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\bannerfarm.ace.advertising.com\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\bin.clearspring.com\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\blip.tv\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\cdn.widgetserver.com\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\cdn1.eyewonder.com\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\cdn4.specificclick.net\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\cdn4.specificclick.net\img\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\core.videoegg.com\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\core.videoegg.com\#com\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\core.videoegg.com\#com\videoegg\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\core.videoegg.com\#ve\
d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects\6RS7BM4P\farm.sproutbuilder.com\

My System SpecsSystem Spec
Old 07-08-2009   #2 (permalink)
Pegasus [MVP]


 
 

Re: Script to clean up Flash Player old files


"Rich" <richjone@xxxxxx> wrote in message
news:FA8C7048-5E64-4B7E-8CC5-6EEDC83FA09C@xxxxxx
Quote:

> All my users Application Data folders are redirected to a file server.
> Everyone has Flash installed in their IE, so when I do a robocopy every
> night
> I end up copying all these pointless files back and forth between servers,
> which makes the log files painfully hard to review when there are
> problems.
> Is there a way in vbscript to have it delete all the files and folders
> under
> the randomly generated name folders, as shown below. I substituted
> UserName
> in the path below for what could really be one of a couple hundred user
> names. The 6RS7BM4P could be any random grouping of letters and numbers
> also
> from what I can tell.
>
> d:\UserName\Application Data\Macromedia\Flash Player\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\
Since you're already using robocopy.exe (which is a console command), it
would make sense to use other console commands to clean our your folders,
e.g. like so:
@echo off
set Folder=d:\UserName\Application Data\Macromedia\Flash
Player\#SharedObjects
for /d %%a in ("%Folder%\*.*") do (
echo rd /s /q "%%a"
echo md "%%a"
)
robocopy ... ... ...

Remove the words "echo" in lines 4 and 5 to activate the batch file.


My System SpecsSystem Spec
Old 07-08-2009   #3 (permalink)
Rich


 
 

Re: Script to clean up Flash Player old files

Is there a smooth way to have it fill in the UserName in the path with the
actual names of the folders under the root level of d: ? or would i just
have to redo that little piece of code and hardcode the username in each time.

when i go into D, i have the following folders as example

Al
Bob
Charles
Derrick
Eric
etc etc...

"Pegasus [MVP]" wrote:
Quote:

>
> "Rich" <richjone@xxxxxx> wrote in message
> news:FA8C7048-5E64-4B7E-8CC5-6EEDC83FA09C@xxxxxx
Quote:

> > All my users Application Data folders are redirected to a file server.
> > Everyone has Flash installed in their IE, so when I do a robocopy every
> > night
> > I end up copying all these pointless files back and forth between servers,
> > which makes the log files painfully hard to review when there are
> > problems.
> > Is there a way in vbscript to have it delete all the files and folders
> > under
> > the randomly generated name folders, as shown below. I substituted
> > UserName
> > in the path below for what could really be one of a couple hundred user
> > names. The 6RS7BM4P could be any random grouping of letters and numbers
> > also
> > from what I can tell.
> >
> > d:\UserName\Application Data\Macromedia\Flash Player\
> > d:\UserName\Application Data\Macromedia\Flash
> > Player\#SharedObjects\
>
> Since you're already using robocopy.exe (which is a console command), it
> would make sense to use other console commands to clean our your folders,
> e.g. like so:
> @echo off
> set Folder=d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects
> for /d %%a in ("%Folder%\*.*") do (
> echo rd /s /q "%%a"
> echo md "%%a"
> )
> robocopy ... ... ...
>
> Remove the words "echo" in lines 4 and 5 to activate the batch file.
>
>
>
My System SpecsSystem Spec
Old 07-08-2009   #4 (permalink)
Pegasus [MVP]


 
 

Re: Script to clean up Flash Player old files


"Rich" <richjone@xxxxxx> wrote in message
news:82372F9E-F6DC-48DE-97D3-47E4126860BB@xxxxxx
Quote:

> Is there a smooth way to have it fill in the UserName in the path with the
> actual names of the folders under the root level of d: ? or would i just
> have to redo that little piece of code and hardcode the username in each
> time.
>
> when i go into D, i have the following folders as example
>
> Al
> Bob
> Charles
> Derrick
> Eric
> etc etc...
>
Simple - you call the existing program once for each name, using exactly the
same code as you already have:
@echo off
for /d %%a in (d:\*.*) do call :Sub %%a
goto :eof

:Sub
set Folder=d:\%*\Application Data\Macromedia\Flash Player\#SharedObjects
for /d %%b in ("%Folder%\*.*") do (
echo rd /s /q "%%b"
echo md "%%b"
)


My System SpecsSystem Spec
Old 07-08-2009   #5 (permalink)
mayayana


 
 

Re: Script to clean up Flash Player old files

I delete the Macromedia folder itself whenever I see it.
As far as I know that folder is only for "super cookies" --
unauthorized, undisclosed large volume storage of data
by a website on the client machine.
But I don't actually have Flash installed myself, so I've
never investigated whether there could ever, possibly,
be something useful in those folders.

Quote:

> All my users Application Data folders are redirected to a file server.
> Everyone has Flash installed in their IE, so when I do a robocopy every
night
Quote:

> I end up copying all these pointless files back and forth between servers,
> which makes the log files painfully hard to review when there are
problems.
Quote:

> Is there a way in vbscript to have it delete all the files and folders
under
Quote:

> the randomly generated name folders, as shown below. I substituted
UserName
Quote:

> in the path below for what could really be one of a couple hundred user
> names. The 6RS7BM4P could be any random grouping of letters and numbers
also
Quote:

> from what I can tell.
>
> d:\UserName\Application Data\Macromedia\Flash Player\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\anthropologie.com\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\as1.suitesmart.com\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\as1.suitesmart.com\_f5e.swf\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\bannerfarm.ace.advertising.com\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\bin.clearspring.com\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\blip.tv\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\cdn.widgetserver.com\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\cdn1.eyewonder.com\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\cdn4.specificclick.net\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\cdn4.specificclick.net\img\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\core.videoegg.com\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\core.videoegg.com\#com\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\core.videoegg.com\#com\videoegg\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\core.videoegg.com\#ve\
> d:\UserName\Application Data\Macromedia\Flash
> Player\#SharedObjects\6RS7BM4P\farm.sproutbuilder.com\

My System SpecsSystem Spec
Old 07-09-2009   #6 (permalink)
Rich


 
 

Re: Script to clean up Flash Player old files

Thanks Pegasus. I will give this a try! You're a genius.

"Pegasus [MVP]" wrote:
Quote:

>
> "Rich" <richjone@xxxxxx> wrote in message
> news:82372F9E-F6DC-48DE-97D3-47E4126860BB@xxxxxx
Quote:

> > Is there a smooth way to have it fill in the UserName in the path with the
> > actual names of the folders under the root level of d: ? or would i just
> > have to redo that little piece of code and hardcode the username in each
> > time.
> >
> > when i go into D, i have the following folders as example
> >
> > Al
> > Bob
> > Charles
> > Derrick
> > Eric
> > etc etc...
> >
>
> Simple - you call the existing program once for each name, using exactly the
> same code as you already have:
> @echo off
> for /d %%a in (d:\*.*) do call :Sub %%a
> goto :eof
>
> :Sub
> set Folder=d:\%*\Application Data\Macromedia\Flash Player\#SharedObjects
> for /d %%b in ("%Folder%\*.*") do (
> echo rd /s /q "%%b"
> echo md "%%b"
> )
>
>
>
My System SpecsSystem Spec
Old 07-09-2009   #7 (permalink)
Rich


 
 

Re: Script to clean up Flash Player old files

Pretty nifty, it deletes the folder and all its subfolders, then recreates an
empty one with the same name.

I had to change the one line to read this though in order to get it to work,
does that sound right? i think it might have been getting the d: twice to
start off the value of the Folder variable.

set Folder=%*\Application Data\Macromedia\Flash Player\#SharedObjects



"Pegasus [MVP]" wrote:
Quote:

>
> "Rich" <richjone@xxxxxx> wrote in message
> news:82372F9E-F6DC-48DE-97D3-47E4126860BB@xxxxxx
Quote:

> > Is there a smooth way to have it fill in the UserName in the path with the
> > actual names of the folders under the root level of d: ? or would i just
> > have to redo that little piece of code and hardcode the username in each
> > time.
> >
> > when i go into D, i have the following folders as example
> >
> > Al
> > Bob
> > Charles
> > Derrick
> > Eric
> > etc etc...
> >
>
> Simple - you call the existing program once for each name, using exactly the
> same code as you already have:
> @echo off
> for /d %%a in (d:\*.*) do call :Sub %%a
> goto :eof
>
> :Sub
> set Folder=d:\%*\Application Data\Macromedia\Flash Player\#SharedObjects
> for /d %%b in ("%Folder%\*.*") do (
> echo rd /s /q "%%b"
> echo md "%%b"
> )
>
>
>
My System SpecsSystem Spec
Old 07-09-2009   #8 (permalink)
Pegasus [MVP]


 
 

Re: Script to clean up Flash Player old files

Thanks for the feedback, and yes, your correction was approppriate - it
corrected an oversight on my part. You should also consider putting the
"robocopy" command into the main routine, just above the "goto :eof" line.


"Rich" <richjone@xxxxxx> wrote in message
news:C5870350-E8B9-4D27-A705-E7038F985B30@xxxxxx
Quote:

> Pretty nifty, it deletes the folder and all its subfolders, then recreates
> an
> empty one with the same name.
>
> I had to change the one line to read this though in order to get it to
> work,
> does that sound right? i think it might have been getting the d: twice to
> start off the value of the Folder variable.
>
> set Folder=%*\Application Data\Macromedia\Flash Player\#SharedObjects
>
>
>
> "Pegasus [MVP]" wrote:
>
Quote:

>>
>> "Rich" <richjone@xxxxxx> wrote in message
>> news:82372F9E-F6DC-48DE-97D3-47E4126860BB@xxxxxx
Quote:

>> > Is there a smooth way to have it fill in the UserName in the path with
>> > the
>> > actual names of the folders under the root level of d: ? or would i
>> > just
>> > have to redo that little piece of code and hardcode the username in
>> > each
>> > time.
>> >
>> > when i go into D, i have the following folders as example
>> >
>> > Al
>> > Bob
>> > Charles
>> > Derrick
>> > Eric
>> > etc etc...
>> >
>>
>> Simple - you call the existing program once for each name, using exactly
>> the
>> same code as you already have:
>> @echo off
>> for /d %%a in (d:\*.*) do call :Sub %%a
>> goto :eof
>>
>> :Sub
>> set Folder=d:\%*\Application Data\Macromedia\Flash Player\#SharedObjects
>> for /d %%b in ("%Folder%\*.*") do (
>> echo rd /s /q "%%b"
>> echo md "%%b"
>> )
>>
>>
>>

My System SpecsSystem Spec
Old 07-13-2009   #9 (permalink)


VISTA home prem 32bit SP2 --- XP Pro SP3 32bit
 
 

Re: Script to clean up Flash Player old files

My System SpecsSystem Spec
Old 07-13-2009   #10 (permalink)
Rich


 
 

Re: Script to clean up Flash Player old files

very cool, thanks! even though i deleted the folders with this script, that
tool showed a bunch of stuff still stored. any idea where all those files or
data that tool shows is actually stored? in a file somewhere, the registry?

"pacinitaly" wrote:
Quote:

>
> 'Adobe - Flash Player : Settings Manager - Website Storage Settings
> panel'
> (http://www.macromedia.com/support/do...manager07.html)
>
>
> --
> pacinitaly
>
> SpellCherkers aren't worth a shirt
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Solved Clean your flash player stored stuff General Discussion
Install flash player (done! ) then java script..where..how?? Vista General
VBS SCRIPT to clean OLD FILE VB Script
[ann] add Flash to your script... VB Script
FLASH PLAYER Vista General


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