Link to home
Start Free TrialLog in
Avatar of Adam Ehrenworth
Adam EhrenworthFlag for United States of America

asked on

Command prompt DIR - get specific fields of information (SharePoint 2007 site)

I have a SharePoint 2007 site we are migrating and I am trying to extract all folders and files within a map network drive for the site using the command prompt and export a text file.

The fields I want to display are the full field path, the last modified date of the file, and the content owner.

Preferably separated by a comma or other character to parse after export.

Any suggestions?

Regards,

Adam
Avatar of John
John
Flag of Canada image

Open cmd.exe and type DIR /?

Full path, last modified date, owner and more are all available.

DIR *.* > File.txt puts the output in a file for you.
Avatar of Adam Ehrenworth

ASKER

What if you want all subfolders and their content as well (including the path?) is it just adding /s?
If that is all you wanted, just add /s

But you can add other parameters to get more information in the same pass for a file.

Run a few tests interactively (not to a file) to see how it works.
The only issue with this method is it shows the path and then all of the files within. is there  a way to display the path on the same line as the actual files themselves?

01/01/2016 X:\systems\samplefile.doc  <Owner>

versus

x:\systems\

01/01/2016 12:15 AM <DIR> 1,000  samplefile.doc
Yes.   DIR /s /b  Then everything is on one line. Works fine.
ASKER CERTIFIED SOLUTION
Avatar of NVIT
NVIT
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Question answered by NVIT ID: 41785513