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 |
|
carumuga
Posting Yak Master
174 Posts |
Posted - 2008-07-21 : 11:04:36
|
| HiI'm trying to use this command from my workstation to see the direcory exist or not in the share directory. It doesnt give me the desired output. Though the file exist, i'm getting the return value 0execute master..XP_FILEEXIST '\\MachineName\test'Fileexist File Is A Directory Parent Directory Exists0 0 0Please help me on this issue. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-07-21 : 11:08:30
|
If you want to see DIRECTORY, why use FILEEXIST?Use xp_dirtree E 12°55'05.25"N 56°04'39.16" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-21 : 11:08:58
|
Declare @Filname nVarChar(260)Declare @Status BitSelect @Filname = '\\MachineName\test'Exec master..sp_MSget_file_existence @Filname, @Status OUTPUTIf @@Error <> 0 Select @Status = 0If @Status = 0 Begin Print 'File not found' EndElse Begin Print 'File found' End |
 |
|
|
|
|
|