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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maintaining a db table to reflects the contents of a file tree

Status
Not open for further replies.

nitram

Programmer
Apr 30, 1999
11
GB
A while back I posted a tip to get a csv file into a db table using an O/S command and the 'xp_cmd_shell' call in a stored procedure.<br><br>I mentioned that I used the same principle to maintain a table to reflect the structure of a file tree. Somebody mailed me asking for a more details on this - here's my example code (<A HREF=" TARGET="_new"> context it was developed for was to suck 'banner adverts' into the customer's public web site. I've edited it a little bit to remove customer-specific stuff (hope it still works :) <br><br>Probably not the most efficient but it seems to work ok. (I'm sure you can do better with DTS for example) <br><br>Anyway hope this is of interest and my coding style is acceptable.
 
Sorry - should have emphasised that this code loads the <b>structure</b> of the file-tree into the table - not the contents of the files themselves. <p>Martin Ramsay<br><a href=mailto:Martin.Ramsay@company-net.co.uk>Martin.Ramsay@company-net.co.uk</a><br><a href= employer</a><br>Looking for interesting work in Canada - any offers ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top