Wrox Programmer Forums
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 21st, 2008, 10:06 AM
Authorized User
 
Join Date: Dec 2006
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default XP_FILEEXIST

Hi

I'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 0

execute master..XP_FILEEXIST '\\MachineName\test'

Fileexist File Is A Directory Parent Directory Exists
0 0 0

Please help me on this issue.

Thanks,
Chandra
__________________
Thanks,
Chandra
 
Old July 21st, 2008, 11:45 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

If you put \\MachineName\test into the run line can you reach that directory?

 
Old July 21st, 2008, 05:18 PM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default

XP_FileExist will not list files... you must supply a file name in the command.

Try this to get a list of files in the directory...

EXEC Master.dbo.XP_Dirtree '\\MachineName\Test',1,1

--Jeff Moden









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.