Jump to content
Sign in to follow this  

Grab flash files from your temp internet files

Recommended Posts


Just a quickly written script that i was using to get flash games from towerdefence.net.

Once you have the .swf files you can just right click and choose open with - Internet Explorer

This script will search your temporary internet files for *.swf

and then put them into a subfolder of script's folder, called swf

;specify the minimum file size of a flash file to be copied - in KB
$MinFileSize = 64

;get temp internet files location from Windows Registry
$tempinternetfiles = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Cache")

;does a dir /s (for search) /b (for bare format)
$commandline = Run(@ComSpec & " /c " & 'dir '&Chr(34)&$tempinternetfiles&"\*.swf"&Chr(34) &" /s/b", "", @SW_HIDE,2)

;loops thru return from dir command (which is just a list of swf files in the temp internet files folder)
Dim $data
While 1
    $data  &= StdoutRead($commandline)
    If @error Then ExitLoop
$line = StringSplit($data, @CRLF)

;create a folder to store the swf files
DirCreate (@ScriptDir&"\swf")

;loop thru the returned list - copying all the files into a subfolder of the scripts folder
;called swf
For $linenumber= 1 To $line[0]
    If $line[$linenumber] <> "" Then
        If FileGetSize($line[$linenumber]) > $MinFileSize* 1024 Then 
        ConsoleWrite(Chr(34) &$line[$linenumber]&Chr(34)&@CRLF)
Edited by boomingranny

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this