Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
skillile
Posting Yak Master
208 Posts |
Posted - 2002-05-01 : 23:15:19
|
| Is there a way to check if a folder exists using xp_cmdshell or another method. I need to list documents is a folder exists.thanks in advanceslow down to move faster... |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-05-01 : 23:35:04
|
HiThere is an undocumented Extended Stored Procedure called xp_fileexist that will do this for you.exec master..xp_fileexist 'C:\'will return something likeFile Exists File is a Directory Parent Directory Exists ----------- ------------------- ----------------------- 0 1 1 If there is a 1 for [file is a directory], then it exists.For more info on this proc, and a bunch more, you should buyThe Guru's Guide to SQL Server Stored Procedures, XML, and HTMLDamian |
 |
|
|
skillile
Posting Yak Master
208 Posts |
Posted - 2002-05-02 : 00:21:10
|
| Sounds good.I do have the book. I was looking at the sp_msexists_file sprocpage 633 and couldn't get it to work.Any suggestionsslow down to move faster... |
 |
|
|
|
|
|