Professional Web Applications Themes

Wildcard and DTS..? - Microsoft SQL / MS SQL Server

Hi all, I have a path in a DTS-package that looks like: sFilename = "d:\path\*.PMS" & Right(Year(Now()), 2) sFilename = DTSGlobalVariables If I use the wildcard "*" I'll get: The filename.....is incorrect. If I use the full filename then it works! How can I get the wildcard to work? /Kent J....

  1. #1

    Default Wildcard and DTS..?

    Hi all,

    I have a path in a DTS-package that looks like:

    sFilename = "d:\path\*.PMS" & Right(Year(Now()), 2)
    sFilename = DTSGlobalVariables

    If I use the wildcard "*" I'll get:
    The filename.....is incorrect.

    If I use the full filename then it works!

    How can I get the wildcard to work?


    /Kent J.


    Kent Johnson Guest

  2. #2

    Default Wildcard and DTS..?

    What are you trying to do?

    If you use FileScriptingObject you can loop through all
    the files in the folder.
    >-----Original Message-----
    >Hi all,
    >
    >I have a path in a DTS-package that looks like:
    >
    >sFilename = "d:\path\*.PMS" & Right(Year(Now()), 2)
    >sFilename = DTSGlobalVariables
    >
    >If I use the wildcard "*" I'll get:
    >The filename.....is incorrect.
    >
    >If I use the full filename then it works!
    >
    >How can I get the wildcard to work?
    >
    >
    >/Kent J.
    >
    >
    >.
    >
    DJoe Guest

  3. #3

    Default Re: Wildcard and DTS..?

    I can predict only the last section of the filename which is YYMMDD
    (??????.PMS030701)
    ...because of that I thought it would be easiest to state a wildcard - just
    like the good old Dos days.

    /Kent J.
    "DJoe" <DJoe> skrev i meddelandet
    news:02bd01c34019$ac3dd7c0$a501280aphx.gbl...
    > What are you trying to do?
    >
    > If you use FileScriptingObject you can loop through all
    > the files in the folder.
    >
    > >-----Original Message-----
    > >Hi all,
    > >
    > >I have a path in a DTS-package that looks like:
    > >
    > >sFilename = "d:\path\*.PMS" & Right(Year(Now()), 2)
    > >sFilename = DTSGlobalVariables
    > >
    > >If I use the wildcard "*" I'll get:
    > >The filename.....is incorrect.
    > >
    > >If I use the full filename then it works!
    > >
    > >How can I get the wildcard to work?
    > >
    > >
    > >/Kent J.
    > >
    > >
    > >.
    > >

    Kent Johnson Guest

  4. #4

    Default Re: Wildcard and DTS..?

    You don't have to know the file names:

    Dim fso, f, fc, fl

    'Create file object to iterate through the files
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFolder("d:\path")
    Set fc = f.files

    For Each fl In fc
    'Do something
    Next
    >-----Original Message-----
    >I can predict only the last section of the filename which
    is YYMMDD
    >(??????.PMS030701)
    >...because of that I thought it would be easiest to state
    a wildcard - just
    >like the good old Dos days.
    >
    >/Kent J.
    >"DJoe" <DJoe> skrev i meddelandet
    >news:02bd01c34019$ac3dd7c0$a501280aphx.gbl...
    >> What are you trying to do?
    >>
    >> If you use FileScriptingObject you can loop through all
    >> the files in the folder.
    >>
    >> >-----Original Message-----
    >> >Hi all,
    >> >
    >> >I have a path in a DTS-package that looks like:
    >> >
    >> >sFilename = "d:\path\*.PMS" & Right(Year(Now()), 2)
    >> >sFilename = DTSGlobalVariables
    >> >
    >> >If I use the wildcard "*" I'll get:
    >> >The filename.....is incorrect.
    >> >
    >> >If I use the full filename then it works!
    >> >
    >> >How can I get the wildcard to work?
    >> >
    >> >
    >> >/Kent J.
    >> >
    >> >
    >> >.
    >> >
    >
    >
    >.
    >
    DJoe Guest

Similar Threads

  1. Wildcard in MySQL
    By Patrick Vanhoucke in forum MySQL
    Replies: 5
    Last Post: December 9th, 05:58 PM
  2. Need help with wildcard
    By 4lua in forum Macromedia ColdFusion
    Replies: 2
    Last Post: June 14th, 09:32 PM
  3. WildCard Defaults
    By Bill in forum Dreamweaver AppDev
    Replies: 4
    Last Post: April 12th, 09:47 PM
  4. Is there any value in ID's Wildcard S&R ?
    By M_Blackburn@adobeforums.com in forum Adobe Indesign Windows
    Replies: 10
    Last Post: July 15th, 01:34 PM
  5. using FTP Wildcard in asp.net code
    By Naveen M in forum ASP.NET General
    Replies: 1
    Last Post: July 23rd, 08:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139