Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Harvest file information into sql table

Status
Not open for further replies.
Feb 10, 2005
1
US
Here is what I working on, daily we harvest all file names and paths into a table. At this point I have it working to some extent but I am missing some of the fields. I can get everything but owner of the file. What I am doing is after hours at 8:00 PM all servers run a command similar to this.

Dir \\svr1\archivedrawings /s/b >c:\dwgimport\files.txt
Dir \\svr2\WORKING\DRAWINGS /s/b >>c:\dwgimport\files.txt
Dir \\svr3\orders /s/b >>c:\dwgimport\files.txt
Dir \\svr4\dwfvault /s/b >>c:\dwgimport\files.txt

This gives me a clean text file I can import later that night. What I need is to either find a different way of doing this or find an advanced cmd line tool to create the txt file that will include owner.

Thanks in advance

Lynn Stallbaumer
 
dir /Q
??

Another way could be using vbscript and filesystemobject, there was a recent post about that.

Cheers


[blue]Backup system is as good as the latest recovery[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top