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

Windows Batch script and SQL

Status
Not open for further replies.

747576

Programmer
Jun 18, 2002
97
GB
Hi,

Is it possible to have sql return a comma separated list (string) of file names that exist in a folder.

This can be done using a batch command script or VBScript, it will be return the file names in a specified folder, but how do I incorporate this into an sql statement or sql sp.

Thank you
 
are you using 2000 or 2005?

In 2000 I believe there's xp_dir but can't confirm.

I can't seem to find an equivalent in 2005 so you'll have to use xp_cmdshell, this will need to be turned on, and be aware of the security implications of this.

of course, if you want a comma delimited list, then you'll have to build it from the results.

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top