You are not logged in.

#1 10 Sep 2010 10:45

Teomangia
Member
Registered: 20 Mar 2010
Posts: 26

Wmi - List all files

Hello everyone.
I would list all files in the Temporary Internet Files folder with WMI.

Set colItemdir = objWMIService.ExecQuery("SELECT * FROM CIM_DataFile where path='\\Documents and Settings\\CurrentUser\\Impostazioni locali\\Temporary Internet Files\\')

For Each objItemdir in colItemdir
  wscript.echo objItemdir.filesize
Next

Works with all folders except the one set.

Why?

It 's a special folder?

Thanks

Offline

#2 10 Sep 2010 13:55

Teomangia
Member
Registered: 20 Mar 2010
Posts: 26

Re: Wmi - List all files

The files in the folder specified, are contained in subfolders. So my script was partially correct. I had to use a recursive query to happen and the individual subfolders.

Offline

Board footer

Powered by