• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Script to clean up Flash Player old files

R
#1
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 Computer

P

Pegasus [MVP]

#2
"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 Computer

R
#3
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 Computer

P

Pegasus [MVP]

#4
"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 Computer

M

mayayana

#5
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 Computer

R
#6
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 Computer

R
#7
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 Computer

P

Pegasus [MVP]

#8
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 Computer

R
#10
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/documentation/en/flashplayer/help/settings_manager07.html)
>
>
> --
> pacinitaly
>
> SpellCherkers aren't worth a shirt
>
 

My Computer

M

mayayana

#11

> 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? I answered that last week. Just delete the Macromedia folder.
(Though that won't work if you've installed the AIR product. That
can create numerous folders under App Data.)

But don't take my word for it. Search for: Adobe flash stored data
If you're a network admin. then you should know about the various
kinds of stored data -- "super cookies" -- that bypass the more
well known privacy settings. I use the following desktop
script to delete common types. But as noted above in regard to
Adobe AIR, the more 3rd-party crap you allow to get installed,
the harder it will be to track stored data.

---------------------------------------------
Basic super-cookie cleaner:
--------------------------------------------

'MsgBox GetCUAppDataPath()

Dim CUPath, FPath, IEUPath, FSO, Pt1, LocFol, WASFil, sApFol, sMsg, Ret,
FoxPath

Err.Clear
On Error Resume Next

Ret = MsgBox("Be sure to read the Storage Data Info file before running this
script. Do you want to proceed now?", 292)
If Ret = 7 Then WScript.Quit

CUPath = GetCUAppDataPath()
If Right(CUPath, 1) <> "\" Then CUPath = CUPath & "\"

Set FSO = CreateObject("Scripting.FileSystemObject")

'----------------- Adobe Flash ---------------------------------

FPath = CUPath & "Macromedia"
FSO.DeleteFolder FPath, True

Select Case Err.Number
Case 0
sMsg = "Successfully deleted hidden Adobe Flash data."
Case 76, 53
sMsg = "No hidden Adobe Flash data folder found."
Case Else
sMsg = "Unable to delete hidden Adobe Flash data folder. Reason: "
sMsg = sMsg & vbCrLf & Err.Description
End Select

MsgBox sMsg, 64


'----------------------- IE path -------------------------------------

Err.Clear
On Error Resume Next

IEUPath = CUPath & "Microsoft\Internet Explorer\UserData"
FSO.DeleteFolder IEUPath, True

Select Case Err.Number
Case 0
sMsg = "Successfully deleted hidden Internet Explorer data."
Case 76, 53
sMsg = "No hidden Internet Explorer data folder found."
Case Else
sMsg = "Unable to delete hidden Internet Explorer data folder. Reason:
"
sMsg = sMsg & vbCrLf & Err.Description
End Select

MsgBox sMsg, 64

'---------------- firefox --------------------------

'-- 2 possible locations for Firefox file. Check both.

Err.Clear
On Error Resume Next
Dim OFols, oFol, oFol1, oFils, oFil, FolName
FoxPath = CUPath & "Mozilla\Firefox\Profiles"
WASFil = "\webappsstore.sqlite"
Set oFol = FSO.GetFolder(FoxPath)
Set OFols = oFol.SubFolders
For Each oFol1 in OFols
FolName = oFol1.Name
If FSO.FileExists(FoxPath & "\" & FolName & WASFil) = True
Then
FSO.DeleteFile FoxPath & "\" & FolName & WASFil, True
If Err.number = 0 Then
MsgBox "Successfully deleted hidden Firefox data.",
64
Else
sMsg = "Unable to delete hidden Firefox data folder.
Reason: "
sMsg = sMsg & vbCrLf & Err.Description
MsgBox sMsg, 64
End If
DropIt '-- if the firefox file was found then quit.
End If
Next

Pt1 = InStrRev(CUPath, "\", (len(CUPath) - 2))
sApFol = Right(CUPath, len(CUPath) - Pt1) ' -- get Application Data
folder name.
CUPath = Left(CUPath, Pt1) & "Local Settings\" & sApFol
FoxPath = CUPath & "Mozilla\Firefox\Profiles"

Set oFol = FSO.GetFolder(FoxPath)
Set OFols = oFol.SubFolders
For Each oFol1 in OFols
FolName = oFol1.Name
If FSO.FileExists(FoxPath & "\" & FolName & WASFil) = True
Then
FSO.DeleteFile FoxPath & "\" & FolName & WASFil, True
If Err.number = 0 Then
MsgBox "Successfully deleted hidden Firefox data.",
64
Else
sMsg = "Unable to delete hidden Firefox data folder.
Reason: "
sMsg = sMsg & vbCrLf & Err.Description
MsgBox sMsg, 64
End If
DropIt '-- if the firefox file was found then quit.
End If
Next

'-- If still going at this point then no webappsstore.sqlite file was
found.

MsgBox "No hidden Firefox data found.", 64
DropIt

Sub DropIt()
Set oFils = Nothing
Set oFol1 = Nothing
Set OFols = Nothing
Set oFol = Nothing
Set FSO = Nothing
WScript.Quit
End Sub

'-------------------------------- function to return current user app data
path. ------------
Function GetCUAppDataPath()
Dim sPathC, ShApC, FolOb, s1C, fParent, PtC, Pt1C, ColonLoc
Err.Clear
On Error Resume Next
Set ShApC = CreateObject("Shell.Application")
Set FolOb = ShApC.NameSpace(26) '--Shell.Application Namespace
method to get folder path.
sPathC = FolOb.title
If (Err.number <> 0) Then '--folder object not retrieved.
Set FolOb = Nothing
Set ShApC = Nothing
GetCUAppDataPath = ""
Exit Function
End If

s1C = "a" '--make s1C something so loop can start.
loop gets path by getting parent folder names.
Do While s1C <> ""
Set fParent = FolOb.parentfolder
s1C = fParent.title
'--an error here means no parent
folder and no : has been found below
If (Err.number <> 0) Then '--so it must be a
namespace (control panel, etc.)
Pt1C = InStr(sPathC, ":")
If Pt1C = 0 Then '--it's a namespace.
clean it up.
PtC = InStrRev(sPathC, "\")
If PtC <> 0 Then
sPathC = Right(sPathC, Len(sPathC) - PtC)
End If
GetCUAppDataPath = sPathC
Set fParent = Nothing
Set FolOb = Nothing
Set ShApC = Nothing
Exit Function
Else '--it's a drive.
extract root folder path (ex.: C:\ )
s1C = mid(sPathC, Pt1C - 1, 2)
GetCUAppDataPath = s1C & "\"
Set fParent = Nothing
Set FolOb = Nothing
Set ShApC = Nothing
Exit Function
End If
End If
Err.clear

Set FolOb = fParent
If (s1C <> "") Then '--look for a colon. if found
then quit loop. if not then keep going.
ColonLoc = InStr(s1C, ":")
If (ColonLoc = 0) Then '-- no colon.
add folder name to path and keep going.
sPathC = (s1C & "\") & sPathC
Else '--colon found. get
root folder, add to path and quit loop.
s1C = Mid(s1C, ColonLoc - 1, 2)
sPathC = (s1C & "\") & sPathC
Exit Do
End If
End If
Loop
Set FolOb = Nothing
Set fParent = Nothing
Set ShApC = Nothing
GetCUAppDataPath = sPathC
End Function
 

My Computer

R
#12
If I find more folders I want to cleanup in regard to Flash, do I just copy
and paste this bit of code after itself and change the folder path?

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


"Pegasus [MVP]" wrote:

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

P

Pegasus [MVP]

#13
It's not a good idea to quote some subroutine in isolation - you tend to
lose the oversight. Here is the whole code again:
@echo off
for /d %%a in (d:\*.*) do call :Sub %%a
goto :eof

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

Now let's look at this in pseudo-code. The main routine says:
"Look at each folder you find on D:\ and pass its name to the subroutine".

The subroutine says:
"Take the parameter you receive and add '\Application Data\Macromedia\Flash
Player\#SharedObjects' to it to form a complete folder name. Now remove
every subfolder tree of this folder, then recreate every subfolder".

You now ask what code you should repeat in order to delete additional
subfolders. You can probably work out the answer yourself after studying the
above pseudo-code. If you can't then you need to be a lot more specific
about the name(s) of the additional folder(s) you wish to delete.


"Rich" <richjone@xxxxxx> wrote in message
news:5B3F4ACA-47F7-435C-BB99-7F70CFAD382F@xxxxxx

> If I find more folders I want to cleanup in regard to Flash, do I just
> copy
> and paste this bit of code after itself and change the folder path?
>
> set Folder=%*\Application Data\Macromedia\Flash Player\#SharedObjects
> for /d %%b in ("%Folder%\*.*") do (
> rd /s /q "%%b"
> md "%%b"
> )
>
 

My Computer

R
#14
Your psuedocode is how I understood it. I just wasn't sure if it was bad
practice more so to just repeat that chunk of subroutine code immediately
after that for another path or not. Guess my question didn't make sense
originally.

"Pegasus [MVP]" wrote:

> It's not a good idea to quote some subroutine in isolation - you tend to
> lose the oversight. Here is the whole code again:
> @echo off
> for /d %%a in (d:\*.*) do call :Sub %%a
> goto :eof
>
> :Sub
> set Folder=%*\Application Data\Macromedia\Flash Player\#SharedObjects
> for /d %%b in ("%Folder%\*.*") do (
> echo rd /s /q "%%b"
> echo md "%%b"
> )
>
> Now let's look at this in pseudo-code. The main routine says:
> "Look at each folder you find on D:\ and pass its name to the subroutine".
>
> The subroutine says:
> "Take the parameter you receive and add '\Application Data\Macromedia\Flash
> Player\#SharedObjects' to it to form a complete folder name. Now remove
> every subfolder tree of this folder, then recreate every subfolder".
>
> You now ask what code you should repeat in order to delete additional
> subfolders. You can probably work out the answer yourself after studying the
> above pseudo-code. If you can't then you need to be a lot more specific
> about the name(s) of the additional folder(s) you wish to delete.
>
>
> "Rich" <richjone@xxxxxx> wrote in message
> news:5B3F4ACA-47F7-435C-BB99-7F70CFAD382F@xxxxxx

> > If I find more folders I want to cleanup in regard to Flash, do I just
> > copy
> > and paste this bit of code after itself and change the folder path?
> >
> > set Folder=%*\Application Data\Macromedia\Flash Player\#SharedObjects
> > for /d %%b in ("%Folder%\*.*") do (
> > rd /s /q "%%b"
> > md "%%b"
> > )
> >
>
>
>
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)