Technical Article

Getting Information if a file exists in SQL

,

THERE is an extended sp called xp_fileexists
given a full path to a file Name

information is a 3 Bit vector
0/1  if a file doesn't/does exist
0/1  is given name is a directory
0/1  if the parent directory exists

EXAMPLE:
EXEC master..xp_fileexist 'd:\mssql7\install\readme.txt'

Rate

4 (1)

You rated this post out of 5. Change rating

Share

Share

Rate

4 (1)

You rated this post out of 5. Change rating