Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi all, Does anyone knows

Status
Not open for further replies.

hkung

Programmer
Jan 9, 2001
19
0
0
MY
Hi all,

Does anyone knows if there's a system store procedure in SQL 2000 which is similar to sp_MSexists_file in SQL 7? I need something to check for the existence of certain file and i guess this is the fastest way to achive my objective :). I've tried executing sp_MSexists_file in SQL 7 and it's working fine. However, it doesn't work in SQL 2000 as i can't find this procedure in SQL 2000 master db. Anyone has any ideas how should i go abt it?
Your help will be greatly appreciated. Thanks in advance.
 
hi a couple of ideas check out

or
in SQL 2000 TRANSACT HELP (transact help type --- xp_cmdshell

or use Dts package more hectic for what i think you are doin but will work in that create an active x script in the script place this code

--------
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************

Function Main()

Dim fso
Dim strSourcePath
Dim strDestPath
Dim strNewFileName
Dim workstr


strSourcePath = "\\Lndc1\Global\London Data\LNCommon\Iss Apps\MIS Download\Newnames\email.txt"

Set fso = CreateObject("Scripting.FileSystemObject")

If fso.FileExists(strSourcePath) Then
' fso.DeleteFile strSourcePath, False
Main = DTSTaskExecResult_Success
Else
Main = DTSTaskExecResult_failure
End If
End Function

Rishi(MCSD,MCP,MCDBA)





---------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top