开发者

is there a way on how to copy Temporary Internet Files?

开发者 https://www.devze.com 2023-02-06 03:13 出处:网络
help me how to copy file from Temporary Internet Files on xp or higher. copyfile not is working on it.

help me how to copy file from Temporary Internet Files on xp or higher. copyfile not is working on it.

i want to make it like 开发者_JS百科CopyFileEx(scr, dst):boolean


I think you are using wrong path. this folder [Internet temporary files] has especial structure, to see this structure, try to search it with [faAnyFile] attribute like this:

procedure TForm2.Button2Click(Sender: TObject);
var
  path: Array[0..MAX_PATH] of Char;
  sRec: TSearchRec;
begin
  SHGetFolderPath(0, CSIDL_INTERNET_CACHE, 0,0, @path);
  if FindFirst(PATH+'\*.*', faAnyFile, sRec) = 0 then
    Begin
      repeat
        ListBox1.Items.Add(sRec.Name);
      until (FindNext(sRec) <> 0);
      FindClose(sRec);
    End;
end;

You will find some folders there like (Content.IE5, Content.MSO, AntiPhishing… ), under folder Content.IE5 you can also find sub-folders with random names like this:

<path>temporary internet files\content.ie5\randomfoldername

So,if you are looking for the cash files you can find it in these random sub-folders but you have to write search algorithm to search these folders for the file you want, and then you can copy it using its real path.

EDIT: also you can see the real structure of the [Internet temporary files] directory using the dir command from dos CMD like this:

is there a way on how to copy Temporary Internet Files?

BTW: don't forget to use th Short Path Name in Dos.


The best way to work with IE's cache is to use the WinInet API for that, in this case the GetUrlCacheEntryInfo/Ex() functions. Pass in the original URL, and it will return the exact local path to the cached file (amongst other things), which you can then copy as needed. Also have a look at the FindFirst/NextUrlCache...() functions for enumerating the contents of the cache.

0

精彩评论

暂无评论...
验证码 换一张
取 消