|
|
| |

How can I check from the SQL Server whether the file exists or not?
Answer:
You can use the xp_fileexist undocumented extended stored procedure
to determine whether the particular file exists on the disk or not.
Syntax:
EXECUTE xp_fileexist filename [, file_exists INT OUTPUT]
To check whether the file boot.ini exists on the disk C: or not, run:
EXEC master..xp_fileexist 'c:\boot.ini'
There are many extended stored procedures shipped with SQL Server and not
all of them have been described in the SQL Server manuals. See this article
to get the useful undocumented extended stored procedures description:
Useful undocumented extended stored procedures
|
|
|