SSIS - How To Create Folder with Date in SSIS Package

Scenario:

We load data from different type of files on daily basis. We want to archive files after load. To manage processed files by date, we need to create a folder with Date every day and move the files to it once processed.

Solution:

We will be creating the Folder with Date if not exists. We will be using File System Task and expressions to achieve this.

Step 1:

Create your new SSIS Package and then create three variables as shown below.
Fig 1: Create Variables for Archive Folder

I created the variables so you can change the value of these according to the environments in which your package is going to run by using SSIS Configuration.

VarFolderPath: It is path to the main folder where we want to create Archive Folder.
VarFolderName : This will hold the value of folder name that we want to create.
VarFolderFullPath: This will combine Folder path, folder name and date added to the end. We will write expression on this variable as shown below.

Step 2: 

Select VarFolderFullPath and then hit F4 to go to properties of variable.
Fig 2: Write Expression on Variable in SSIS Package

Set EvaluateAsExpression=True and then Click on the button right front of Expression. Under Expression , write the below expressions as shown below

@[User::VarFolderPath]+ @[User::VarFolderName]+"_"+REPLACE(SUBSTRING((DT_STR,50,1252)GETDATE(),1,10),"-","_")

Fig 3: Build Expression in SSIS Package for Folder with Date

Step 3: 

Bring File System Task to the Control Flow Pane and then configure as shown below.
Fig 4: Create Directory With Date By Using File System Task In SSIS Package

Let's run our SSIS Package and see if the directory is created in required folder.

Fig 5: Folder Created with Date by Using SSIS Package

Now you have the folder ready to move your processed files to it.


Video for this post


18 comments:

  1. Online slots (slotxo) are games that are very popular among teenagers because they are easy to play. If we know the secret to playing was able to make extra income And it is also a game where the gambler has a huge advantage over the dealer. There are free credits. I want to make the jackpot explode, and a large amount of luck can fall on it. เกมสล็อตxo

    ReplyDelete
    Replies
    1. Welcome To Techbrothersit: Ssis - How To Create Folder With Date In Ssis Package >>>>> Download Now

      >>>>> Download Full

      Welcome To Techbrothersit: Ssis - How To Create Folder With Date In Ssis Package >>>>> Download LINK

      >>>>> Download Now

      Welcome To Techbrothersit: Ssis - How To Create Folder With Date In Ssis Package >>>>> Download Full

      >>>>> Download LINK cV

      Delete
  2. This time, Niaga Readymix , as an Online Ready Mix Provider, will provide information about Jayamix prices for the needs of various types of foundry, not residential houses, road construction, sports fields, and various commercial buildings and other public facilities. harga cor molen per kubik

    ReplyDelete
  3. Deposit and withdraw with a reliable automated system There are more than 100,000 users per day. Unlimited deposits-withdrawals. Login to play online slots here 55xo ... slot jili

    ReplyDelete
  4. Welcome To Techbrothersit: Ssis - How To Create Folder With Date In Ssis Package >>>>> Download Now

    >>>>> Download Full

    Welcome To Techbrothersit: Ssis - How To Create Folder With Date In Ssis Package >>>>> Download LINK

    >>>>> Download Now

    Welcome To Techbrothersit: Ssis - How To Create Folder With Date In Ssis Package >>>>> Download Full

    >>>>> Download LINK aE

    ReplyDelete
  5. he popular actor, James belushi, is highlighted via biographical information, filmography, links, photos, and information and music from his band The Sacred ... jim

    ReplyDelete
  6. This is a combination of action, comedy, parody point-and-click movie games. This comes up with a unique plan of features that lead players to stick to it more. fleeing the complex unblocked

    ReplyDelete
  7. Mainly, the game will come in the form of a classic slot game that retains a lot of seasoning. Which is a favorite of these old slots fans. who are used to playing slots in real casinos when brought to the website of online slots Of course, our website PGSLOT91 , the best online slots provider. ทดลอง เล่น pg slot

    ReplyDelete
  8. buy British stock lottery How to bet on British stocks easily here English stock market lottery today Thai lotto lottery website Online lottery ThaiLotto, pay hard, pay real money, big discounts, lots of promotions. หวยออนไลน์

    ReplyDelete
  9. Hunting Hoop is a list of the best products for people who want to save time and are confused about figuring out what brand to buy? We review for what we think .. https://www.huntinghoop.com/best-gun-cleaning-solvent/

    ReplyDelete
  10. Bright, healthy skin starts with choosing good products. suitable for skin and regular skin care routines It starts with cleaning ... โฟมล้างหน้าผู้ชาย

    ReplyDelete
  11. Eye makeup No. 1 sales worldwide. ALL. mascara · brow · eyeliner · eyeshadow. Maybelline New York's No. 1 makeup in ... แป้งพัฟ

    ReplyDelete
  12. Find the Sabina Company location here. There are many branches in Bangkok and other provinces. Covering the whole of Thailand Ready to serve you anytime. บราปีกนก

    ReplyDelete
  13. Serum Find the right product for you. including hair care products, hair coloring, makeup, foundation, lipstick and skin care treatments anti wrinkle that meets the needs ... ลิปสติก

    ReplyDelete
  14. Our other flavours include peach, watermelon, apple, sour bears, sour worms, emoji, and gummy worms. Our sizes and prices range from 250mg for £16.14, 500mg for £29.40, 750mg for £33.90, 1000mg for £40.56 and 3000mg for £91.74. We also have a great selection of vegan CBD gummies. So whatever CBD sweet you prefer, you will obtain the benefits of CBD in each bite. CBD Sweets

    ReplyDelete
  15. Our ATV Shop Allows You To Shop The Best by Search/Filter Options, Product Category, Filter By ATV Model and Vendor Level To Find All Your UTV Upgrade Options. muller

    ReplyDelete
  16. 메이저놀이터는 기존에 사용하던 토토사이트와 달리 다양한 스포츠베팅 종목과 부가적인 게임을 서비스하여 각 게임의 규칙을 숙지하신 후 올바르게 사용하실 수 있습니다. 토토사이트

    ReplyDelete
  17. Thanks for sharing valuable post after reading this article I got some unique info and if you want to know about CBD Gummies just go there.

    ReplyDelete