Please enable Javascript for better experience...
 
VB Script: Retrieving Extended Files Properties of all files in folder, and import all attributes to Excel file
By Pranay Jha | Feb 10, 2016 | In Articles | Update: May 4, 2016 | Total Views [ 4181 ]
(1 Like)
Rate

To list extended Properties of files inside folder, use below script.

Save script in any localtion, i;e C:\Script.vbs, run below command

C:\>cscript //nologo script.vbs > report.csv

In addition, depending on the OS version, the properties are in different order and there may be many more.  Win XP has 33 standard items, but Win 7 has 286 and the order of some of them differ between the two OSs.

Script,...

--------------------------------------------------------------------------------------

Dim arrHeaders()
 
Set objShell = CreateObject("Shell.Application")Set objFolder = objShell.Namespace("D:\Database")
 
On error resume nextFor i = 0 to 287
  redim preserve arrHeaders(i)
  arrHeaders(i) = objFolder.GetDetailsOf(objFolder.Items, i)
  if err.number <> 0 then exit forNextOn error goto 0
wsh.echo "File Name" & "," & Join(arrHeaders, ",")
   
For Each strFileName in objFolder.Items
  wsh.stdout.write strFileName
  For j = 0 to i - 1
    wsh.stdout.write "," & objFolder.GetDetailsOf(strFileName, j)
  Next
  wsh.echo
Next


Thanks for visiting here. Share this article if you found it useful.
Like Facebook Page https://www.facebook.com/VMwareInsight/
Connect to twitter https://twitter.com/imPranayK
Subscribe my Channel https://www.youtube.com/vmwareinsight
Connect over Linkedin https://in.linkedin.com/in/impranayk
Share this on Social Media

About the Author

Pranay Jha
Pranay Jha
Founder, Contributer VMwareInsight.com

Public profile: user/profile/99900000


Follow me

facebook linkedin twitter G+ VMTN youtube

Thank you for visiting my profile. I am Pranay Jha, bring along a total of 11+ years of extensive experience with me in Information Technology sector for organizations from small business to large enterprises, wherein my current assignment I am associated with IBM as a Technical Solution Architect for Virtualization platform. I am vExpert x 3 (16/17/18), VCIX-DCV, VCAP5/6-DCD, VCAP5-DCA, VCP7-CMA, VCP5/6-DCV, VCA-DCV, VCA-Cloud, VSP, VCE-CIA, MCITP, MCSE, MCSA(Messaging). I am also an Independent blogger and founder of http://vmwareinsight.com and https://cloudpathshala.com. I can be reached via email at pranay1988jha@gmail.com or Direct Message via Contact Us form.

 
Please SignUp/Login to comment...

Or comment as anonymous...
* Name
* Email ID
Comment
 
Sponsors
 
 
 
 
 
Facebook Likes