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 |
|
johnaby1
Starting Member
1 Post |
Posted - 2003-07-10 : 09:25:12
|
| hi,Can anyone help me out !!how to list all the file names in a particular directory in Stored Procedure.I need to do this in Stored Procedure ...Pls provide me some solution...hope to hear from u..Thanks in advanceJohn |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2003-07-10 : 09:54:50
|
| Try this:exec master..xp_cmdshell 'dir D:\MyDirectory'You need to have permissions to run xp_cmdshell, and be careful with it. With this extended proc you can run practically any (DOS) command...its certainly not the kind you want to give execute permissions for to everybody.Owais |
 |
|
|
|
|
|