SQL Server Performance

Working with file system in SSIS

Discussion in 'SQL Server 2005 Integration Services' started by WingSzeto, Nov 14, 2008.

  1. WingSzeto Member

    Is it possible to create a file system in SSIS that can delete any files in a folder and keep files that have the first day of the month in the creation date? If this needs to be done in some VB script, please give some detail sample since I am not good at vb script.
    Thank in advance,
  2. satya Moderator

    I believe using SQLCMD or Powershell you could control such a tasks, search on Powershell for this and if I get to see any such links I will post here.
  3. Hi Wingman,
    I suppose you can use Windows Management Instrumentation Tasks (WMI Event Watcher Task), and can perform following kind of works
    • Wait for notification that files have been added to a folder and then initiate the processing of the file.
      • Run a package that deletes files when the available memory on a server drops lower than a specified percentage.
        • Watch for installation of an application, and then run a package that uses the application.
      • BOL - ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10is_1devconc/html/b5bb52e9-a77e-41e1-93f9-d4c3bc6b2c9a.htm
        If you are using SSIS 2008, you can refer to file system assemblies(contained in System.IO namespace) in your script task.
        Hope it helps.

Share This Page