Windows Vista Forums

Script to clean up Flash Player old files

  1. #1


    Rich Guest

    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

  2. #2


    Pegasus [MVP] Guest

    Re: Script to clean up Flash Player old files


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

    > 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

  3. #3


    Rich Guest

    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:

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

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

  4. #4


    Pegasus [MVP] Guest

    Re: Script to clean up Flash Player old files


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

    > 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

  5. #5


    mayayana Guest

    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.


    > 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

  6. #6


    Rich Guest

    Re: Script to clean up Flash Player old files

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

    "Pegasus [MVP]" wrote:

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

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

  7. #7


    Rich Guest

    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:

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

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

  8. #8


    Pegasus [MVP] Guest

    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

    > 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:
    >

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

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

  9. #9
    pacinitaly's Avatar
    Join Date : Jan 2009
    worst state in America
    Posts : 1,396
    VISTA Business 32bit SP2
    Local Time: 07:52
    usa

     

    Re: Script to clean up Flash Player old files

      My System SpecsSystem Spec

  10. #10


    Rich Guest

    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:

    >
    > '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

Page 1 of 2 12 LastLast
Script to clean up Flash Player old files

Similar Threads
Thread Forum
Need help with my script to clean Log data.
So here's what I have and could use some help. I'm a scripting newbie. I'm cleaning IPs out of IIS logs in powershell. I'm calculating the current...
PowerShell
Clean your flash player stored stuff
I don't remember if I offered this B4, This website cleans your flash player stored stuff. just wait 3-4seconds for page to load then click...
General Discussion
Install flash player (done! ) then java script..where..how??
Vista home premium.. I.E. 7 ...I tried to display some sports videos on www.Yahoo.com and an error message said "need the latest Flash player...
Vista General
Flash Player
How do I get Flash Player to install on a Vista machine? It keeps saying to close Mozilla and Mozilla isn't open.
Vista General
VBS SCRIPT to clean OLD FILE
Hi all, I have a folder with same backup file and I must delete the file older than 4 days before. How can I do with VBS Script? thanks in advance
VB Script
[ann] add Flash to your script...
I was working my way through some FBSL (a scripting language) scripts, and came across a "U-Tube Grabber" script, written by Gerome Guillemin. ...
VB Script
Flash Player
Hi... Have a problem with IE. If I go to www.youtube.com and try to watch a video, I'm told that "you either have JavaScript turned off or an...
Vista General