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 |
|
svicky9
Posting Yak Master
232 Posts |
Posted - 2006-04-22 : 16:50:13
|
| hi guys I am listing the directories on the windows server 2003 using the Xp_cmdshellwhen i execute <b>xp_cmdshell 'dir \\servername\IT\'</b>it lists all the files within the directory but it does not list for the folders that contain space in the middlefor eg<b>xp_cmdshell 'dir \\servername\IT\sql program'</b>It says the system cannot find the file specifiedbut when i use start-->run-->\\servername\IT\sql programit opens the directoryso how do i execute the path in xp_cmdshellthanksVic |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-04-22 : 17:00:39
|
| tryxp_cmdshell 'dir \\servername\IT\"sql program"\'orxp_cmdshell 'dir "\\servername\IT\sql program\"'Can never remember when the quotes go round the whole string.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
svicky9
Posting Yak Master
232 Posts |
Posted - 2006-04-22 : 17:07:33
|
| Thanks Both the queries worked |
 |
|
|
|
|
|