moorthy_kulumani
asked on
Enmurate file properties resides on File share
We have a requirement to pull few file properties for around 10 TB of files stored in the file server.
We are trying to pull properties like filename, owner of the file, the location (directory), size, Last accessed, Last modified, created date etc., output to a excel file.
We cannot use any free tools in our environment and we would like to do it by some scripts.
What we have already tried is using powershell but unfortunately we could not get the file properties which are more than 260 characters. Here is the powershell command we have used.
Get-ChildItem -path \\servername\share -recurse | Select-Object Name, CreationTime, LastAccessTime, LastWriteTime, Fullname,@{n='Owner';e={ (Get-Acl $_.Fullname).Owner }} | Export-Csv c:\out.csv
I am looking to pull all the file properties including the files which are more than 260 characters. Please help me with the script and some lead on this.
-Ram
We are trying to pull properties like filename, owner of the file, the location (directory), size, Last accessed, Last modified, created date etc., output to a excel file.
We cannot use any free tools in our environment and we would like to do it by some scripts.
What we have already tried is using powershell but unfortunately we could not get the file properties which are more than 260 characters. Here is the powershell command we have used.
Get-ChildItem -path \\servername\share -recurse | Select-Object Name, CreationTime, LastAccessTime, LastWriteTime, Fullname,@{n='Owner';e={ (Get-Acl $_.Fullname).Owner }} | Export-Csv c:\out.csv
I am looking to pull all the file properties including the files which are more than 260 characters. Please help me with the script and some lead on this.
-Ram
for the owner info, you have to use WMI or GetDetailsOf. the later is different for W2000 than XP+. can we assume that no Win2000 involved ?
ASKER
Those file shares are hosted in Windows 2003 server.
Can you guide me the right script in these links....
Can you guide me the right script in these links....
just realised that Powershell cn create the Shell object and may be best in your envionment. see text at bottom of http://msdn.microsoft.com/en-us/library/bb787872%28v=VS.85%29.aspx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Tahnks, Let me test and confirm... I assume it can take files with more than 260 letters length, Should i use unc name \\server\share or mapped drive letter ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
just found this..
http://www.tech-archive.net/Archive/Scripting/microsoft.public.scripting.jscript/2007-12/msg00034.html
http://blogs.technet.com/filecab/archive/2006/02/15/419183.aspx
\\?\ not supported by scripts
http://www.tech-archive.net/Archive/Scripting/microsoft.public.scripting.jscript/2007-12/msg00034.html
http://blogs.technet.com/filecab/archive/2006/02/15/419183.aspx
\\?\ not supported by scripts
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The VB Script is working ...I don’t know wherther or not I have 260 + characters files....I am not sure how we havecreated more than 260 characters files in our servers…
The VB script you have given can pull the files more than 260 characters? If not could you please share the C# script, I really don’t get a clue on how can write one with C# ..
Appreciate your help…
The VB script you have given can pull the files more than 260 characters? If not could you please share the C# script, I really don’t get a clue on how can write one with C# ..
Appreciate your help…
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for all your help...I will try posting this in C# area.
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
shows how to lots of these using VBScript and the FSO.
recursion is not hard either. check wether the FSO can return all the data you want.
http://classicasp.aspfaq.com/files/directories-fso/how-do-i-find-the-owner-author-and-other-properties-of-a-file.html