Hi Zak,
that is interesting. Does the following script find the files correctly on your PC?:
Petr' Code removed -> see updated version few posts below ;)
i have posted before about restoring files from temporary internet files folder on windows xp which happened to be inside the C:\windows folder.
today i have tried it with windows 7, since the files here is inside the folder C:\users like this:
C:\Users\zak\AppData\Local\Microsoft\Windows\Temporary Internet Files\
go to youtube and watch some video, no need to finish it.
use the freeware xsearch from http://www.easexp.com/xsearch/
and search in folder c:\users for the part of file name videoplay
don't forget to check search for hidden files in the attribute, check them all but not case sensitive.
you will find that a file without extension with a name videoplayback[1], just copy it to folder of your choice and add extension .flv to its name, the normal flv players may not able to play it but the free "wimpy flv player" from http://www.wimpyplayer.com/products/...lv_player.html and the "media player classic" http://sourceforge.net/projects/guliverkli2/ can run it.
rename the file and add it to your Library.
any other videos watching will save the files to names like this
videoplayback[2], videoplayback[3], etc
PS: the windows xp "Temporary Internet Files" are not in C:\windows but in a folder like this:
C:\Documents and Settings\zak\Local Settings\Temporary Internet Files
Last edited by zak; 10-04-2011 at 15:06.
Hi Zak,
that is interesting. Does the following script find the files correctly on your PC?:
Petr' Code removed -> see updated version few posts below ;)
Last edited by Petr Schreiber; 10-04-2011 at 16:40.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Hi Petr
thanks for the code.
in windows xp i am wrong the temporary files is not in c:\windows but in folder like this:
C:\Documents and Settings\zak\Local Settings\Temporary Internet Files
the xsearch in windows xp find videoplay in a folder like this:
C:\Documents and Settings\zak\Local Settings\Temporary Internet Files\Content.IE5\UN9DG0LU
the Local Setting in hidden and read only
the search utility of windows xp can't find the file even i put the the path to search "C:\Documents and Settings\zak\Local Settings"
i have noticed that "Temporary Internet Files" can't be seen inside Local Settings" and customise this folder by unchecking Hidden feature does not show the temp files folder, it is also a long process if the temp folder is too big. but somehow xsearch can find it.
running the thinbasic code after changing to startDir = "C:\Documents and Settings\zak\Local Settings\Temporary Internet Files" does not found or copied the videoplay to the created "Videos04_10_2011..." folder.
in windows 7 , the same situation, the videoplay file are in a folder like this:
C:\Users\zak\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5\NVZN0PDB
(it is changed for every video watch)
but thinbasic code can't find it . i think the same if we use the win 7 search util, but i havn't tried it since it is too messy and tortured.
It would be possible I think to knock together a simple YouTube downloader in thinBasic using mplayer & ffdshow.
Hi,
few observations:
- it did not find the file, because the folder is marked as system, adding %FILE_SYSTEM to parameter of directory listing fixed it
- it did not copied file, because there was no file_copy
The following code does work okay for me on Windows 7 - it found all videos I played in IE9 and they can be played back (using VLC player).
Let me know if it worked for you...
Matthew, I am not sure how is FLV encoded, do you have info about that?
Petr' ' Work in progress YouTube video search tool ' v1.1 ' Uses "console" Uses "FILE", "OS" Long videosFound String foundVideosDirectory = APP_SourcePath+"Videos"+Replace$(Date$+"_"+Time$, Any "-:", With "_")+"\" Function TBMain() String startDir If InStr(OS_WinVersionText, "Windows 7") Then startDir = "C:\users\" Else startDir = "C:\Documents and Settings\" End If PrintL "Press any key to start search for videofiles in your cache..." PrintL "Search will be performed from "+startDir WaitKey DIR_Make(foundVideosDirectory) PrintL "Created dir for found files named:" PrintL foundVideosDirectory PrintL PrintL "Searching..." ListDir(startDir) PrintL PrintL "Search finished, press any key to continue..." WaitKey End Function Function ListDir(lDir As String) As Long Local Count As Long Local Item As String Local nItems As Long Local Directories() As String Console_SetTitle(lDir) nItems = DIR_ListArray(Directories, lDir, "*.*", %FILE_SUBDIR Or %FILE_HIDDEN Or %FILE_SYSTEM Or %FILE_ADDPATH) If nItems > 0 Then For Count = 1 To nItems Item = Directories(Count) ScanVideos(Item) ListDir(Item) Next End If End Function Function ScanVideos(lDir As String) As Quad Local Count As Long Local FileName As String Local nItems As Long Local TotSize As Quad Local fSize As Quad Local Files() As String nItems = DIR_ListArray(Files, lDir, "*videoplayback*", %FILE_NORMAL Or %FILE_HIDDEN Or %FILE_SYSTEM Or %FILE_ADDPATH) If nItems > 0 Then For Count = 1 To nItems FileName = Files(Count) PrintL PrintL "Found:", FileName videosFound += 1 FILE_Copy(FileName, foundVideosDirectory+"Video"+Format$(videosFound, "000")+".flv") PrintL "Copy finished..." Next End If Return nItems End Function
Last edited by Petr Schreiber; 10-04-2011 at 16:56.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
like a magic realy, you are the real Magician Petr, in windows xp which i prefer i have added my Temporary Internet Files path
startDir = "C:\Documents and Settings\zak\Local Settings\Temporary Internet Files\"
and it copied the the youtube videos i have watched.
this is a relief from using xsearch since it is copying all the video files to one folder, one file Video001 are not hidden, the other Video002 somehow is hidden (in windows xp) so i have to uncheck the hidden attribute. may be this because i have played yoo much with hide and unhide the local settings folder.
this is a great utility, i suggest to Eros to include it in the Examples in the new ver. of thinbasic .
one of the major benefits using this utility from using other utilities is that you do not need to watch the video and then after that to use a downloader to download it again, but just to copy what you have just watched.
just a note for the users, since those video files in a temporay folder it is deleted frequently, so do not wait until watching many videos , but copy it frequently with this utility.
thank you Petr very much
Last edited by zak; 10-04-2011 at 17:34.
Hi Zak,
well, thanks for bringing such a task into my attention I was simply curious whether thinBASIC directory/file listing routines can reach any path/file present on PC, so now I see yes, they do
Thanks to this little script I realised there is slight problem with OS_WinGetVersionTimeline, which Eros (as usually) instantly fixed for next release.
There is no magic involved in the script (I wish it was possible ), but as I use ThinBASIC daily at work, it becomes more and more easy to transfer ideas to code.
Petr
Last edited by Petr Schreiber; 10-04-2011 at 18:02.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Bookmarks