Looping multiple excel files at a time in ssis and create a new column to insert the files names

Hi Friend,
i have one requirement.
I got around 200 excel files with date as file name like 120101.xls, 120102.xls (YYMMDD).
I am able to loop all the files and insert data but i am unable to load the files names using ssis.
Please can any one help to fix this using script task or any other code..
It is very urgent

Thank You Vaibhav,
I want to insert the file name along with the other columns of data from excel.
like this deriving a new column FILE_NAME
Your ForEach Loop task must be returning the entire file path, I suppose.
1. Get the file name from your file path. 
New variable: FileName 
Expression   : RIGHT(@[User::FilePath],FINDSTRING(REVERSE(@[User::FilePath]),"\\",1)-1)
2. Inside Data flow, after Excel source use Dervied Column and use above @FileName
3. At your OLEDB destinition, use MyFileName.
-Vaibhav Chaudhari

Similar Messages

  • Every time I try to create a new project it says "The File Could Not Be Opened," how do I fix this?

    Every time I try to create a new project it says "The File Could Not Be Opened," how do I fix this?

    see if the "oddbal problems" fix helps:
    http://www.bulletsandbones.com/GB/GBFAQ.html#oddballprobs
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Every time I try and create a new folder on my desktop, it is never empty, but contains all my existing files. Am I doing something stupid?

    Every time I try and create a new folder on my desktop, it is never empty, but contains all my existing files. Am I doing something stupid?

    Is this what it looks like when you open the new untitled folder:
    The left column always shows unless you choose 'hide sidebar' in the Finder View menu drop down options and, on mine,  it shows two items on my desktop - the new folder and a previously created folder.

  • Every time I try to create a new button I get "photoshop file error -1"

    I'm creating a BluRay set of discs. I'm on number 4 and there will probably be 12. I use the previous discs as a template for the new ones to save huge amounts of time. I haven't had an issue till I opened my project today. Usually I right click on a menu, edit it in photoshop, save it back in, and then I right click the new elemnts and turn them into buttons. I've made dozens of menus like this. Then today I get "photoshop file error -1" that pops up every time I try to make something into a button. I deleted the menu I was working on and used a different menu to rebuild it but I get the same problem. I then opened the photoshop file and saved it to a different location outside the project and then imported it into Encore. Same problem once I tried to make buttons. I also tried trashing the preferences. No Luck. I really need to get this working. It has completely destroyed my ability to get this job done. Ideas anyone?
    If it helps, I am on a Mac running OS X 10.9.1. Encore is version CS5.1.

    I thought there ought to be way to add buttons from the Encore library, but I don't think we found one.
    Best case: add menu from the library with buttons like what you want. Change background etc.
    I like working that way rather than adding things within Encore.
    Worst case: add a menu with the buttons you want; "edit in photoshop" and also "edit in photoshop" your menu; copy paste to your menu.
    You can also directly open library menus; add buttons etc from the encore library folders. I would make a copy of them first. Encore imports a menu from the library to your project; it is never working on its master copy.

  • Photoshop plugin/script to have it read and create a new file from an excel file?

    I do prepress and cover design for our book manufacturing company. I have made a tool that I input book specs into and it tells me the exact size of the photoshop document I need to create for an accurate book cover layout. It calculates total width, height, spine placement and spine width, bleeds, and even where to place the adobe guides in the document.
    I've always book toggling back and forth on my mac to get the measurements etc while I am designing a cover. What I want to know is if there is a way this can all be automated.
    I know photoshop supports scripting and plugins but I have not found anything remotely along the lines of what I am looking for. If I could get this process automated somehow my workflow and productivity would shoot through the roof!
    In short I am looking for a script/plugin for Adobe photoshop CS3 that can read from an excel sheet and create a new document based on the specifications in that excel file.
    Does anyone know if this is already out there? Or if it can be done? I would certainly invest in this.
    Thanks!

    xbytor answered to you already for javascript.
    It's something that is very easy to do using applescript (scripting excel through excel applescript dictionary, i have used it for a projet, found it usefull for the scenario i was working with, but it was incredibly slow.. same thing in Realbasic when driving application through automation.
    Depending on the number of record that need to be processed (if you dont have to fetch data in different tabs) it's often better to have a "pre-process" to save the excel file as a CSV and using any other solution to process the text file. Can make a HUGE difference in processing time...
    You will surely be able to find a professional to help you with this task if you willing to pay for custom developpement.
    If you have internal ressource or want to give it a try yourself, have a look at this:
    http://download.microsoft.com/download/3/A/7/3A70FB4B-0C6A-43E3-AAB7-AC9166B25632/Excel200 4AppleScriptRef.pdf
    ps: Beware! The dictionnary can have little difference depending of the excel version that you use.

  • HT1338 How do I prevent iDVD 7.1.2 from shutting down every time I try to create a new project?

    Every time I try to create a new project on iDVD, the program shuts down with one of those "unexpected error" messages. This just started a few days ago, and was working fine prior to this.

    Try this basic troubleshooting fix :
    1 - delete the IDVD preference file, com.apple.iDVD.plist, that resides in your
    User/Home/Library/ Preferences folder.
    2 - delete the contents of IDVD'S cache folder, User/Home/Library/Caches/com.apple.iDVD. 
    3 - launch IDVD and try again.
    OT

  • How to crop a mp3 file and create a new small one from it?

    Hi all,
    I would crop a long mp3 sound file and create a new small one with the short part from the long mp3 sound file. How to do it? Anybody can help me?
    Thank you very much.
    Regard
    David

    Have you managed to do this?
    I would also like to know how.
    Thanks
    Jeff Singer

  • HT1597 How can I STOP iTunes from automatically trying to add podcasts to my iPod when I plug it in and sync it, so I can manage the files? I have already unchecked "Sync Podcasts" and "Automatically include,"yet EVERY time I sync it,it still transfers po

    How can I STOP iTunes from automatically trying to add podcasts to my iPod when I plug it in and sync it, so I can manage the files? I have already unchecked "Sync Podcasts" and "Automatically include,"yet EVERY time I sync it,it still transfers podcasts as the last step, and at other times randomly, when trying to just add some MP3's to a playlist, for example.  I can't seem to find any other option to uncheck, and can't find an answer from my so-far internet searching.

    erict, you blew me away with that suggestion! It was something so simple I couldnt believe I hadnt thought of it! But in the end it didn't work, which I was really surprised about. On Windows anytime anything was moved itunes was hoplessly lost, but on this mac it still kept up with everything. I tried renaming folders, moving folders, and even renaming moved folders but it still kept trying to import.
    I even went as far as deleting EVERYTHING i had moved to the Mac, which didnt really work. It still kept trying to import what wasnt there which made it continue to freeze up. However, after doing this it, the freezing was not nearly as bad. It gave me enough of a break to cancel it through the itunes dialog box at the top of the app. So in the end, thats all I really needed to do, only before I had deleted everything the freezing would not allow me to do it.
    So now Im reimporting everything again, only slowly, and only a few Artists at a time.

  • I accidentally deleted my media files from iTunes and Trash when I was trying to move the files to an external hard drive. Is there a way to restore the media files from a Time Machine backup or from iTunes Match? What are the steps to do this?

    I accidentally deleted my media files from iTunes and Trash when I was trying to move the files to an external hard drive. Is there a way to restore the media files from a Time Machine backup or from iTunes Match? What are the steps to do this?

    If you have been backing up on Timemachine.
    All you need to do is enter time machine... Then the rest is obvious.
    Find the iTunes folder and hit 'Restor'.
    If not the only way to get all your iTunes music back is to enter iTunes Store.
    On the right hand side you should see 'Purchased'.
    Click 'purchased' and there you have it.

  • Does running scanpst ever fully correct or fix the pst? Ran it 416 times so far trying to get it to fully clean the file.

    Does running scanpst ever fully correct or fix the pst? Ran it 416 times so far trying to get it to fully clean the file.
    I've ran this scanpst within Win7 outlook 2010 for 3 days. The scanpst began taking about 4 minutes to finish and still showed that there were errors in the file. After 416 runs through the scanpst, the file is taking about 15 to 30 seconds. It's greatly
    improved but this is ridiculous. Why isn't there something from tech support to fully fix the file without starting a new profile and starting over? There's just too much info needed to be saved. If it's simply transferred over to the new profile then it works
    for a short time then the corrupt files wreck the new profile. I've really searched for this answer and gotten no where even on youtube. Some of the issues are mostly hanging outbox or rejected login 0x80042109, 0x800421A, 0x800CCC92 and 0x800CCC1A. Please
    assist in stopping the madness.
    Thanks, ICRonline

    There's just too much info needed to be saved. If it's simply transferred over to the new profile then it works for a short time then the corrupt files wreck the new profile.
    This isn't an attempt to provide any kind of definitive answer but your description begs a number of questions...
    #1 - What kind of email account is this particular PST file associated with - POP3 or IMAP?
    #2 - If IMAP - am assuming that the PST file in question is related to the one which contains the <Inbox> folder> correct?. Simply deleting (renaming) this file will result in a new one being automatically recreated with the contents of whatever
    exists on the server (assuming you have no created any kind of <local only> unsubscribed folders in the tree) - which then begs the question as to whether or not the root of the problem exists within the data stored on the server
    #3 - If POP3 - what is the format of the PST file - ANSI or Unicode? If ANSI - what is the size of the file? ANSI files max out at 2gb
    To determine the format - right click on the root of the PST file --> properties --> click <Advanced> button --> if the <Format> field description contains <97-2002> - it's an ANSI based PST file. (Regardless of anything else - if
    this is the case - should be converted to a UNICODE file)
    #4 - Where is the PST file being stored - on a local drive or a network drive? If network - not supported and highly prone to causing corruption.
    #5 - Purely from a logical perspective - the fact that things appear to work properly for the "first few days" after a new profile is created indicates that there is something consistently occurring on some kind of 'timed basis" triggering
    your issues. If that's the case, even if ScanPST did fully clear all issues - just a matter of time before the same thing happens again (whatever "that thing" may happen to be) - ergo, in this scenario, highly unlikely that ScanPST is the answer
    since what really needs to be done is to find the root cause of what is triggering the problem.
    #6 - It would also be pretty safe that this is not a generic issue impacting everyone using OL'2010 - regardless of OS so your environment is one deserving a lot of close scrutiny.
    Karl Timmermans [Outlook MVP] "Outlook Contact Import/Export/Data Mgmt" http://www.contactgenie.com

  • I have been trying to share file between my Mac Book Air and PC Laptop.Sometimes my Mac sees the PC and tries to connect but every time the connection fails. It says server may not exisit or network problem. I have apparently no network problem. Thanks fo

    I have been trying to share file between my Mac Book Air and PC Laptop.Sometimes my Mac sees the PC and tries to connect but every time the connection fails. It says server may not exisit or network problem. I have apparently no network problem. Thanks for any help you may provide

    hi,
    somewhere on the windows machineshould be something like "network setup wizard". exactly where it is and what it is called i cannot remember off the top of my head, windows help is actually slightly useful here, it should have a link to it.
    all the options checked on the mac are only what services the mac is offering to other machines, they have nothing to do with the services it can access (mostly...).
    oh yeah, to actually connect to the pc after you have turned its sharing on, use the finder, or, when it does not show the pc (this happens on and off, possibly a refresh problem apple...) choose go --> connect to server and enter smb://<pc's name or ip>
    to find the ip, the easiest way i think is
    start --> run --> cmd ->> ipconfig
    Andrew
    Message was edited by: Andrew Dicker

  • I am trying to upload files to an Apple hosted feed on KSU iTunes U (unpublished site). The file size shows as 2 GB even though the files are 50MB. The upload stalls and fails. Address:

    I am trying to upload files to an Apple hosted feed on KSU iTunes U (unpublished site). The file size in the Feed Editor shows as 2 GB even though the files are 50MB. I am using Safari on Intel Mac 10.5.8. at Kennesaw State University. Any help would be appreciated.

    This is the second day. I tried using a new Apple feed to test. Still not working. I uploaded a 50MB mp3 file. The first time the upload failed. The second time the file showed that it was uploading a 2 GB file. It has been about 20 minutes now and shows "3.5GB of 2.0GB 178% Completed". Now it has started uploading all over again - it is now showing 399.4MB or 2.0 GB - 19% Completed. I dont know if this will keep looping - but I am going to Cancel.
    Please let me know what other information do you need from me. Definitely need some help with this!

  • I am trying to delete an XLS file from a network drive and am getting a message that says the file cannot be deleted because it is in use.  I can't see where it is in use and have tried to reboot the computer to no avail.

    I am trying to delete an XLS file from a network drive and am getting a message that says the file cannot be deleted because it is in use.  I can't see where it is in use and have tried to reboot the computer to no avail.  I can delete other files but several XLS files are giving me this message.

    You said it was a network drive.  So is someone else on the network using that same file or may have have left with excel still accessing it on their system?

  • TS4605 Hi, I was working in WORD on a file containing huge data. My machine just hung up one day while working and now I seem to have lost the file how do I get it back.  Please HELP me.

    Hi, I was working in WORD on a file containing huge data. My machine just hung up one day while working and now I seem to have lost the file how do I get it back.  Please HELP me.

    Well, iCloud has nothing to do with this.
    Do you have the built-in backup function Time Machine running on your Mac?
    See: http://support.apple.com/kb/ht1427

  • Hello, starting with today I have a strange problem: all events are correctly shown in the finder but in FCP-X there`s`none and every time I open it creates a new event. What is wrong?

    Hello, starting with today I have a strange problem with Final Cut Pro X: all events are correctly shown in the finder but in FCP-X there`s`none and every time I open it creates a new event. What is wrong?

    Here`s the screenshot.
    But anyway:
    The drive is Makintosh HD from my Macbook and it is shown in the event mediathek and in the projects. Since I`ve recognized this problem I installed FCPX again and consequently the event and project directory created by FCPX is where it should be and it shows all the test events including it`s files.
    So what happens? Opening FCPX you see only one event and that a new empty event. All previous events are not shown there even if you can see them in the finder. So if you import again the clips they are in this new event library. After closing correctly FCPX and reopening there again is nothing than an new and empty event. What it does is that it recognized that i.e. there are events with previous numbers and so it creates an new one with the next available counting number.
    If you want to open one event from the finder it by clicking to the file it opens FCPX but it says it cannot open the clicked file.

Maybe you are looking for