RE: Using a wildcard with the FTP Task



Hi Jason,

Welcome to the MSDN newsgroup.

As for the SQL server DTS taskobject's "SourceFileName" property, based on
my research, this property can only contains file entries (construct a file
list) which have fixed filename and path. And the syntax must be strictly
following the below pattern:

'name1';'path1';'size1';'name2';'path2';'size2';'name3';'path3';'size3'

Wildcard or any other parituclar search pattern specific characters can not
be embeded in the path list, and the DTS engine has no sense of such
characters which will cause the error you encountered.

BTW, I'm wondering what's your detailed scenario or background on this
issue. Is it possible that you use any other programming interface such as
..net framework or cpp or only pure script here? If some rich programming
interface is allowed in your scenraio, you can consider programmatically
use some filesystem component to query the file lists(with certain search
pattern or wildcard) from the remote share server, and also programmtically
construct such a file list (string ) for the dts taskobject's
"SourceFilename" property. As far as I know, .net framework has rich
file IO component that can list or search files on a specific NTFS file
location. If you're limited in vbscript, you can consider use
FileSystemObject to loop file on the certain share folder and capture all
the files matchs expected pattern. e.g:

=====================
Set objShell = CreateObject ("Shell.Application")
Set objFolder = objShell.Namespace ("\\server\sharename")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim arrHeaders(13)

For i = 0 to 13
arrHeaders(i) = objFolder.GetDetailsOf (objFolder.Items, i)
Next

For Each strFileName in objFolder.Items
if not InStr(strFileName, ".dat") = 0 then
For i = 0 to 13
If i <> 9 then
Wscript.echo arrHeaders(i) _
& ": " & objFolder.GetDetailsOf (strFileName, i)
End If
Next

end if
Wscript.Echo
Next
=======================

Then, you can construct a path list through the query result for your DTS
task object's sourcefilename property. How do you think of this?

Please feel free to post here if you have any other ideas or consideration.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial

response from the community or a Microsoft Support Engineer within 1
business day is

acceptable. Please note that each follow up response may take approximately
2 business days

as the support professional working with you may need further investigation
to reach the

most efficient resolution. The offering is not appropriate for situations
that require

urgent, real-time or phone-based interactions or complex project analysis
and dump analysis

issues. Issues of this nature are best handled working with a dedicated
Microsoft Support

Engineer by contacting Microsoft Customer Support Services (CSS) at

http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.



.



Relevant Pages

  • RE: Same connection manager for multiple control flow tasks
    ... I want to share the Excel Data Source. ... Data Sources that I see within each Control Flow DTS 2000 Package Task. ... Thank you for contacting Microsoft Online Community Support. ... the DTS 2000 package designer, the SQL 2005 object seems not be recognized, ...
    (microsoft.public.sqlserver.dts)
  • Re: Stay with DTS or move to SSIS?
    ... I agree with Rick SSIS could do more complexsity jobs than DTS and ... sometimes it may be slower than DTS due to data type transfer etc. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.sqlserver.dts)
  • Re: Flat File import fails on large number of rows
    ... What about BCP would not cause this problem that is occuring in DTS? ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. ... > incident from from a Microsoft Support Professional through Microsoft ...
    (microsoft.public.sqlserver.dts)
  • RE: BAM
    ... I can not define alerts neither in activity search nor aggregation. ... I am out of office now, I will check the DTS and let you kow. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.biztalk.general)
  • Re: Conversion to sqlserver.ce
    ... If you download SQL Server 2005 beta from MSDN, you will be able to do this ... with DTS. ...
    (microsoft.public.sqlserver.ce)