By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
In the following example, the file name is stored in a global variable.
Function Main() Dim oFSO, sFileName ' Get the name of the file from the global variable "ImportFileName" sFilename = DTSGlobalVariables("ImportFileName").Value Set oFSO = CreateObject("Scripting.FileSystemObject") ' Check for file and return appropriate result If oFSO.FileExists(sFilename) Then Main = DTSStepScriptResult_ExecuteTask Else Main = DTSStepScriptResult_DontExecuteTask End If Set oFSO = Nothing End Function
Dig Deeper on SQL Server Database Modeling and Design
Related Q&A from Joe Toscano
Is there a query to search text in a SQL Server DTS package? SQL Server expert Joe Toscano explains which database objects can be viewed.continue reading
Migrate DTS packages to SQL Server Integration Services with Migration Wizard and deploy SSIS packages in SQL 2005. Learn how to access DTS Designer ...continue reading
Convert SQL Server 2000 DTS packages to SQL Server 2005 with this advice and also see how to overwrite data.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.