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 |
|
Razmo
Starting Member
5 Posts |
Posted - 2009-07-28 : 11:27:32
|
| This works:SET @Cmd = 'dir C:\SomeDirectory\*.* >> C:\SomeOtherDirectory\Dir.Txt'EXEC master..xp_cmdshell @CmdThis does not:SET @Cmd = 'dir SomeDriveLetter:\SomeDirectory\*.* >> C:\SomeOtherDirectory\Dir.Txt'EXEC master..xp_cmdshell @CmdBut yet when 'ran' in a cmd session, example 2 works.I'm running Windows XP Pro on a Novell network. Am I doing something wrong or is xp_cmdshell incompatible with the OS I'm running? |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Razmo
Starting Member
5 Posts |
Posted - 2009-07-28 : 12:46:53
|
| Thanks for your reply Brett. In this case the server (Express) is on my PC, so in theory should recognize the same drive letters, correct? |
 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2009-07-28 : 13:12:54
|
| mapped drives are user specific. xp_cmdshell runs under a different account.Be One with the OptimizerTG |
 |
|
|
|
|
|