Import Files with Date-stamped Filenames or Paths | Database Journal

Import Files with Date-stamped Filenames or Paths

Mar 11, 2003
1 minute read


MAK [Muthusamy Anantha Kumar]

DTS packages are fantastic features available in SQL Server 7.0 and SQL server
2000. One outstanding feature in the DTS package is the ability to run ActiveX scripts.
ActiveX gives us an added advantage in handling many situations; we will
discuss how to handle three of these situations.

  1. File-names with date-stamp as a prefix or suffix or root
    word.

    Eg: \\FileServer\SharedFiles\Bankthree-20030218.txt

  2. File-paths with date-stamp as a prefix or suffix or root
    word.

    Eg: \\FileServer\SharedFiles\20030218\BankFour.txt

  3. Handling only previous business day date-stamped files

Process Involved

Create Connection to Source files and database.

Give the source file names of SourceFile1 and SourceFile2
to any existing files, for example c:\autoexec.bat. We are going to control the
Path of the connections through ActiveX Controls.

Create Transformation between Sourcefiles and Database connections.

Now create two ActiveX scripts, one for each sourcefile.

Database Journal Logo

DatabaseJournal.com publishes relevant, up-to-date and pragmatic articles on the use of database hardware and management tools and serves as a forum for professional knowledge about proprietary, open source and cloud-based databases--foundational technology for all IT systems. We publish insightful articles about new products, best practices and trends; readers help each other out on various database questions and problems. Database management systems (DBMS) and database security processes are also key areas of focus at DatabaseJournal.com.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.