Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 cannot locate file using a wildcard

Author  Topic 

p.shaw3@ukonline.co.uk
Posting Yak Master

103 Posts

Posted - 2005-11-28 : 08:45:03
I am trying to use a vbscript ActiveX script to locate files as part of my package. The files are randomly named but all end with ".tpl.txt". I am using a wildcard to attempt to pick up the extension. To test I am using:

Function Main()

Dim objFSO

Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("\\ftp01\ERMFTP_Data\Data\*.tpl.txt") Then
msgbox("EXISTS")
Else
msgbox("File does not exist.")
End If
Main = DTSTaskExecResult_Success
End Function

Although the path is definately correct and the files are there, I get the ("File does not exist.") message box. Does anyone know why please?
   

- Advertisement -