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


32 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. PGSLOT online slots are really easy to play. With a lot of good offers. Play xo slots here 1slot.co win free credits every day. slotxoฟรีเครดิต

    ReplyDelete
  4. 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
  5. 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
  6. Playing online gambling on the 389Sports site there is nothing to worry about, especially about the authenticity and guarantees of online gambling siteswe. situs judi online

    ReplyDelete
  7. Popular in Thailand are SA GAMIMG , AE SEXY (or SEXY GAMIMG) , PG Pocket Games soft , Joker Gaming , Pretty Gamimg , Dream Gaming (DG) , AMB Poker , Pragmatic Play , SIMPLEPLAY , XGAMIMG , ALL Bet , SBOBET บาคาร่า มือถือ

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

    ReplyDelete
  9. The Best Collection Of Top New 55+ Beautiful Happy Saturday Images For You. You Can Download These Wonderful Saturday Images For Free. Sunday Blessings Images

    ReplyDelete
  10. As a state-owned enterprise and part of the Tourism Authority of Thailand, Thailand Elite is the only country membership program with benefits for immigration, leisure, business with access to privileges that money alone cannot buy. Providing conveniences for Elite members as soon as they set foot in Thailand. Thailandelite expense

    ReplyDelete
  11. 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
  12. The Urban Internet Company, a Canadian owned urban internet service provider (ISP) offering urban cable internet plans (and some urban DSL internet plans). internet service providers

    ReplyDelete
  13. 2Tua99 is the best online lottery service provider in 2022, stable financial status, real money, government lottery betting, Laos lottery, Hanoi lottery, Malay lottery, stock lottery, Yi Ki lottery, online lottery , this website is the highest paying website. There are many lottery to choose from. หวยจีน

    ReplyDelete
  14. As informed that the website over there, pg slot games are genuine, which online gamblers are well known that slot games from PG camps are games that can make quick profits. because it is a slot that is easy to break So if you've played a genuine game You can be confident that you will be able to make profits quickly. ae casino

    ReplyDelete
  15. Play the latest online slots games, famous camps, direct websites, PG Slot Wallet , online slots websites 2022 that are played by the most people. and the most accepted Able to deposit and withdraw with no minimum It also supports top-up via True Wallet, which can be done easily with a mobile phone at your fingertips. สล็อต pg

    ReplyDelete
  16. The big and famous casino gambling website kingmaker-finnbet.com , a new gambling website that focuses on providing full online gambling services, including slot games, casino games, sports betting, a wide variety of things to bet on, the best direct betting website เล่น ไฮโลออนไลน์

    ReplyDelete
  17. Male enlargement pills, SummerLove brand, 100% safe male enhancement pills with FDA, many properties, good to use, easy to eat, ready to fight every day! ทำไงให้อึด

    ReplyDelete
  18. 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
  19. Promotion, clear lottery website, Chudjenbet lottery website, has every lottery, Laos lottery, Hanoi lottery, stock lottery, government lottery, Yi Ki lottery, bet with us, pay hard, pay real money, big discount ... ชัดเจนหวย

    ReplyDelete
  20. 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
  21. SEO is a website of Thai freelancers that provide services for doing white belt SEO Fastwork

    ReplyDelete
  22. 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
  23. Bright, healthy skin starts with choosing good products. suitable for skin and regular skin care routines It starts with cleaning ... โฟมล้างหน้าผู้ชาย

    ReplyDelete
  24. allergic rash on the skin People with allergies, asthma, or immune disorders can develop this type of rash. Appearance is a red rash, itching, common in various parts, edge ... หน้าลอก

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

    ReplyDelete
  26. 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
  27. 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
  28. 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
  29. Hello i,m from blogger Agen Judi Online Terpercaya, i try look around at another people site or blogger for the recomendation of my new blog, cause i want to learn something new about blogger and the writing style. Thanks for alr sharing, such a great work.

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

    ReplyDelete