Appending multiple *.csv files while retaining the original file name in the first column

Hi guys it's been awhile.
I'm trying to append multiple *.csv files while retaining the original file name in the first column, the actual data set is about 40 files.
file a.csv contains:
1, line one in a.csv
2, line two in a.csv
file b.csv contains:
1, line one in b.csv
2, line two in b.csv
output.csv result is this:
I would like this:
a.csv, 1, line one in a.csv
a.csv, 2, line two in a.csv
b.csv, 1, line one in b.csv
b.csv, 2, line two in b.csv
Any suggestions to speed up my hobbling attempts would be aprieciated
Thanks,
-SS
Solved!
Go to Solution.

What you could do is given in the attachment.
Started with 2 files :
a.csv
copy of a.csv
Both with data :
1;1.123
2;2.234
3;3.345
Output :
a.csv;1;1.123
a.csv;2;2.234
a.csv;3;3.345
Copy of a.csv;1;1.123
Copy of a.csv;2;2.234
Copy of a.csv;3;3.345
If you have more questions, just shoot
Kind regards,
- Bjorn -
Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's
LabVIEW 5.1 - LabVIEW 2012
Attachments:
AppendingCSV.JPG ‏73 KB

Similar Messages

  • Import clips into FCP X version 10.0.8 and keep the original clip names

    Can you Import clips into FCP X version 10.0.8 and keep the original clip names in the event original media folder? in version 10.0.8 it automatically allocates date / time of the event. I need it to keep the original clip name i:e Clip0100 event folder original media Clip0100. I am aware you can change the clip name to original once in FCP X, But it's the event folder original media name which I want to remain as the original file name.

    Hi Tom,
    Thanks for the response.
    I am aware you can do this change in the Info inspector so the original clip name from camera is used in the event library browser, but it does not change the clip name in the Final Cut Events Original Mieda file. This still remains as an event clip name "2013-05-23 17_08_13". I need the original clip name Clip0100 to remain as Clip0100 at import. FCP X doesn't seem to allow this happen any more in version 10.0.8.
    Cheers
    D..

  • How can we find the original XML Name of a Field

    Hi All,
    Just like the Reports To Field has XML Name as *[<ManagerFullName>]*
    Can anyone tell me how I can find the Original XML Name for the "Reports To (Alias)" User field?.
    Thanks in advance,
    Royston

    My scenario is that,
    When a user saves a new campaign I want to change the owner of this campaign to the user he reports to i.e(Manager Alias) Since the Owner field takes the Alias Name.
    To achieve this I have created a workflow to assign that Campaign to the Manager.
    Here is the Code snippet
    The triggering event is : Before modified record is saved.
    action is Update Field Owner with UserValue('<ManagerAlias>')
    Unfortunately its not accepting the ManagerAlias field....I have tried a similar scenario with the <ManagerFullName> field and its working fine.
    Thanks,
    -Royston
    Edited by: Royston Goveia on May 12, 2009 9:59 PM

  • External Table which can handle appending multiple csv files dynamic

    I need an external table which can handle appending multiple csv files' values.
    But the problem I am having is : the number of csv files are not fixed.
    I can have between 2 to 6-7 files with the suffix as current_date. Lets say it will be like my_file1_aug_08_1.csv, my_file1_aug_08_2.csv, my_file1_aug_08_3.csv etc. and so on.
    I can do it by following as hardcoding if I know the number of files, but unfortunately the number is not fixed and need to something dynamically to inject with a wildcard search of file pattern.
    CREATE TABLE my_et_tbl
      my_field1 varchar2(4000),
      my_field2 varchar2(4000)
    ORGANIZATION EXTERNAL
      (  TYPE ORACLE_LOADER
         DEFAULT DIRECTORY my_et_dir
         ACCESS PARAMETERS
           ( RECORDS DELIMITED BY NEWLINE
            FIELDS TERMINATED BY ','
            MISSING FIELD VALUES ARE NULL  )
         LOCATION (UTL_DIR:'my_file2_5_aug_08.csv','my_file2_5_aug_08.csv')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;Please advice me with your ideas. thanks.
    Joshua..

    Well, you could do it dynamically by constructing location value:
    SQL> CREATE TABLE emp_load
      2      (
      3       employee_number      CHAR(5),
      4       employee_dob         CHAR(20),
      5       employee_last_name   CHAR(20),
      6       employee_first_name  CHAR(15),
      7       employee_middle_name CHAR(15),
      8       employee_hire_date   DATE
      9      )
    10    ORGANIZATION EXTERNAL
    11      (
    12       TYPE ORACLE_LOADER
    13       DEFAULT DIRECTORY tmp
    14       ACCESS PARAMETERS
    15         (
    16          RECORDS DELIMITED BY NEWLINE
    17          FIELDS (
    18                  employee_number      CHAR(2),
    19                  employee_dob         CHAR(20),
    20                  employee_last_name   CHAR(18),
    21                  employee_first_name  CHAR(11),
    22                  employee_middle_name CHAR(11),
    23                  employee_hire_date   CHAR(10) date_format DATE mask "mm/dd/yyyy"
    24                 )
    25         )
    26       LOCATION ('info*.dat')
    27      )
    28  /
    Table created.
    SQL> select * from emp_load;
    select * from emp_load
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    SQL> set serveroutput on
    SQL> declare
      2      v_exists      boolean;
      3      v_file_length number;
      4      v_blocksize   number;
      5      v_stmt        varchar2(1000) := 'alter table emp_load location(';
      6      i             number := 1;
      7  begin
      8      loop
      9        utl_file.fgetattr(
    10                          'TMP',
    11                          'info' || i || '.dat',
    12                          v_exists,
    13                          v_file_length,
    14                          v_blocksize
    15                         );
    16        exit when not v_exists;
    17        v_stmt := v_stmt || '''info' || i || '.dat'',';
    18        i := i + 1;
    19      end loop;
    20      v_stmt := rtrim(v_stmt,',') || ')';
    21      dbms_output.put_line(v_stmt);
    22      execute immediate v_stmt;
    23  end;
    24  /
    alter table emp_load location('info1.dat','info2.dat')
    PL/SQL procedure successfully completed.
    SQL> select * from emp_load;
    EMPLO EMPLOYEE_DOB         EMPLOYEE_LAST_NAME   EMPLOYEE_FIRST_ EMPLOYEE_MIDDLE
    EMPLOYEE_
    56    november, 15, 1980   baker                mary            alice     0
    01-SEP-04
    87    december, 20, 1970   roper                lisa            marie     0
    01-JAN-99
    SQL> SY.
    P.S. Keep in mind that changing location will affect all sessions referencing external table.

  • HT204406 I opened i Tunes on my mac and while i see the songs in some of my playlists they will not play. The computer says the song could not be used because the original file could not be found. Would you like to locate it? When i do it won't play.

    I opened i Tunes on my mac and while i see the songs in some of my playlists they will not play. The computer says the song could not be used because the original file could not be found. Would you like to locate it? When i do it won't play.

    You will need to locate where you itunes library is and then relink one of the songs, itunes will do the rest. So if your itunes library is on an external hard drive or something like that. When you get the error message click yes you would like to locate it. then navigate to the external hard drive where the itunes libray is and locate that particular song. Once you have linked one, itunes will ask if you would like it to locate the rest, click yes and it will find the rest of the files if they are in the same location.

  • I dropped my external hard drive which contained my iTunes library and it is no longer readable. I attempted to upload my library from iPod and while all the songs appear to be in iTunes I get a message telling me that the original file can't be located.

    I dropped my external hard drive that contained my iTues library and the disk is no longer readable. I figured I would simply transfer my music back from my iPod to my MacBook Pro and it loks like it worked. All the songs are there, but I receive a message that the original file can't be found when I try to play anything. ANy help would be greatly appreciated.

    A Couple of questions..
    Is the location shown under preferences/Advanced/General still showing the correct location?
    Is the check boxes under this checked or unchecked?

  • Appending the Original File Name as Suffix to Receiver File Name

    Been searching and I've seen Michael's blog about creating a UDF to place the original file name in the payload.    Since this is a file->file scenario, I have no mapping. 
    I have the Adapter-Specific Attributes turned on on the Sender to pass the file name in the DynamicConfiguration of the message header and I can see it in the message.
    What I want to do it to have a target file name in the form of:   XXXXX_<i>originalfilename</i>.
    So I have turned on variable substitution and created a variable called 'file'.
    In the File Name Scheme Parameter I have entered: XXXXXX_%file%
    If I set the variable substitution refererance for 'file' to message:message_id, my file name is created as XXXXX_message_id,  or any of the other options from -> <a href="http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm">SAP Adapter Help Page</a>
    How can I get the value of FileName as the value for my variable %file%?

    > Actually, what I meant was the mapping will not know
    > the value I have entered in the receiver
    > communication channel - File Name Scheme parameter
    > value.   For example in CC for Target System 1  the
    > FNS = FMRECEIVER1, the CC for Target System 2 the FNS
    > = FM_RECEIVER2 and so on.  
    >
    > Are you saying in the mapping I could access the
    > value of FNS from the communication channel in the
    > mapping?   
    No, you cant read in mapping what you set in CC.
    However, you can ignore the parameter FileName scheme in CC and just set it in mapping runtime.
    The way you are using, you'll have to maintain the prefix for each receiver adapter you have. If you had it in mapping, you could just do something like:
    String receiver = container
        .getTransformationParameters().
        .get(StreamTransformationConstants.SENDER_SERVICE);
    DynamicConfiguration conf = (DynamicConfiguration) container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        “http://sap.com/xi/XI/System/File”,
        “FileName”);
    String orgFileName = conf.get(key);
    String tgtFileName = receiver + "_" + orgFileName;
    conf.put(key, tgtFileName);
    and then you wouldn't have to maintain the file name scheme in CC.
    Regards,
    Henrique.

  • 'The song "xyz" could not be used because the original file could not be found.

    I am quite new to iTunes so please excuse me if the questions seem daft 
    I have recently changed my default iTunes Media folder location from my local C:\ drive to my home network storage device
    (my PC is permanently mapped to this NAS storgae drive)
    Now When I go to play a song in itunes I get the message 'The song "xyz" could not be used because the original file could not be found. Would you like to locate it"
    Looking in the new iTunes Media folder, I can see the following folders and they are mostly empty:
    Automatically Add to iTunes
    Downloads
    Mobile Applications
    Music
    Note that I have music that I bought from iTunes and music from other sources \ given to me by friends
    Questions:
    (1) How do I get all my music back into this new iTunes Media folder?
    (2) Exactly which files contain my music? (I ask because we have 2 or 3 libraries that I wish to consolidate into 1 master Library for us all)
    If I know exactly which files are required I can delete any other files cluttering up my storage and PC

    Changing the media folder path tells iTunes where to put new media that is ripper or purchased. It may offer to consolidate to the new location when you make the edit, if not iTunes will expect existing content to remain on the original path.
    The "missing file" error happens if the file is no longer where iTunes expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, one of its parent folders, or the drive it lives on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout, or vice-versa, and so is looking in slightly the wrong place.
    Select a track with an exclamation mark, use Ctrl-I to Get Info, then click No when asked to try to locate the track. (Due to a bug in iTunes 12 you currently have to say No twice!) Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, a folder renamed, or a drive letter has changed, it should be possible to reverse the actions. If the difference between the two paths is an additional Music folder in one path then this is a layout issue. I can explain further if that is the case.
    In some cases iTunes may be able to repair itself if you go through the same steps with Get Info but this time click Locate and browse to the lost track. It may then offer to attempt to automatically fix other broken links.
    If another application like Windows Media Player has moved/renamed the files then the chances are that subtle differences in naming strategies will make it hard to restore the media to the precise path that iTunes is expecting. In such cases, as long as the missing files can be found somewhere, you should be able to use my FindTracks script to reconnect them to iTunes. See this post for an explanation of how it works.
    For more background on the typical layout of the iTunes library see Make a split library portable.
    1) It depends on exactly what you have done to break things.
    2) Your media files are where you put them, or where iTunes copies them to when they are added to the library. If multiple libraries use the same set of media folders there can be problems if edits in one library cause content to be moved as the other libraries will no longer see those tracks on the original path, and won't know to look in a new one.
    tt2

  • The song could not be used because the original file could not be found. Would you like to locate it?

    Suddenly unable to access & play music in iTunes,  I have paid for. 
    Frustrating - *** apple?
    Attemps I have made to no avail...
    1)  Choose one specific broken file. Press CTRL+I to Get Info. Navigate song myself...
    This lead me through music>itunes>itunesd media to an Empty envelope with the song name.
    2)  Retrieve song from previous back ups. 
    I went to my external hard drive updated with Time Machine & was again lead to an empty folder with the song name that has an ! beside it in iTunes.
    3) 
    iTunes WILL NOT let me download it again.  It says "play" beside the song title instead of "purchase" (as it should) but even when i try to play it from iTunes says "The song could not be used because the original file could not be found. Would you like to locate it?"
    which of course leads no where.
    4)
    Checked iTunes for songs that needed to be downloaded - nothing.
    5)
    Not in trash bin
    I have not moved or renamed any songs.
    There are not multiple copies of the same song in my music library.
    songs are apparently missing & so not able to be put into a new folder.
    like most, i truly do not have time to take time out to find  multiple songs or  i purchased via itunes .
    so frustrating.
    Help very much appreciated.

    Previous purchases may be unavailable if refunded or if no longer on the iTunes store.
    •Downloading past purchases from the iTune Store, App Store, and iBooks Store:
    http://support.apple.com/kb/HT2519
    •iTunes - Apple Support:
    http://www.apple.com/support/itunes/
    •iTunes: Apple Support Communities:
    https://discussions.apple.com/community/itunes
    Sorry that your missing purchases no longer appear available.
    Not sure what other recourse you have.
    Good luck & happy computing!

  • Batch rename files preserving the original file name in metadata

    How can I batch rename files while preserving the original file name in metadata? (Don't want the old file name as part of the new file name)
    (Adobe CS Bridge can do this with some success, but I don't want to be dependant on this software. Results are inconsistent.)

    With a simple terminal script. More details needed, though.

  • The song...could not be used because the original file could not be located

    I just used Garageband this past Sunday, no problem...I open it up tonight and I get this message:
    "The song...could not be used because the original file could not be located."
    I click the OK button and it comes up with another song title, and I have clicked it 20 or 30 times already and it keeps coming up and I can't access anything else and it is frustrating!
    Anyone know how to stop the madness?!
    iMac 2.7 GHz Intel Core i5, 8 GB RAM, 1 TB HD, OS X 10.9.3
    Garageband 10.0.2

    "The song...could not be used because the original file could not be located."
    GarageBAnd cannot find the recorded media or imported audio files, that should be in the Media folder inside your project.
    Crtl-click the GarageBand icon in the Dock and use Force-quit to quit your current project.
    Then ctrl-click the .band file of your current project and select  "Show package contents." open the Media folder inside and check if all recorded media and imported audio files are there and you can play them.
    Have you moved your project or has it been transferred by mail?
    If the media are missing or do not play, there is not much you can do. If all media are there, repair the permissions of the project. If it is on an external drive, move it to your system drive and try there.
    If you cannot rescue the project, copy the media file out of the project, so you can use the recordings to recreate the song.You can launch GarageBand into the file "recent songs" panel to create a new project or to pick a recent project, by holding down  the alt/options key while double-clicking the GarageBand icon.

  • Less destructive fix for the "original file could not be found" issue

    +(Note: this is mostly a copy of the post I just submitted in reply to http://discussions.apple.com/message.jspa?messageID=6785594#6785594)+
    Most solutions to the "The song xxx could not be used because the original file could not be found. Would you like to locate it?" issue involve deleting iTunes library files, deleting-then-re-importing everything from iTunes, and other destructive techniques. I found an easier fix for this, but it might be (a) specific to libraries on a network drive (NAS) or (b) specific to me. YMMV, but give it a try. This was on a Mac, so a Windows solution might exist with the same technique. Please post here and let me know if this works for you!
    After some investigating and trial-and-error, I discovered that if I viewed a list of songs in Finder, iTunes could find the files again. For example:
    *Double click on a song in iTunes and get the "original file could not be found..." error. Do not say 'Yes' to locating it.
    *Open Finder and locate that Folder of songs
    *Double-click on another song from that album. It should work.
    So, my fix: *run a command that lists/touches every file in your iTunes music folder.*
    For Macs:
    *Open Terminal
    *Run this: *ls -R /Path/To/Your/iTunes\ Music \Folder/* (note how you 'escape' spaces in the folder name with back-slashes).
    Windows:
    *Start - Run - cmd
    *Run this: dir /s \Path\To\Your\"iTunes Music Folder" (note that you escape spaces by quoting the dir name.)
    My NAS is named "VAULT" so my command was "ls -R /Volumes/VAULT/My\ Music/" You will see the files being listed at light speed -- ignore this. It will run for a while, depending on how many files you have, about 30 seconds for me. After executing this I could listen to any music file in iTunes!
    But, every time I lost my connection to my NAS, such as waking from sleep mode, I had to run it again. So I created an Automator application and a Apple Script to run it from within iTunes so I can run it any time I need to. If you don't want to do that, just run the command I specified. If you want to download my Automator app, or see instructions on how to create your own, check out my blog post: http://40withegg.com/2008/3/8/mac-attack-making-itunes-find-those-original-files -especially-on-a-nas
    With any luck, my post will be *completely unnecessary* soon because Apple will find a real solution to this.

    Jeffe hello,
    I have seen more problems created by the consolidate command than I have ever seen fix things... I'm not saying it does not work but what it does do and what it does not is very hard to work out for most and major problems are the result...
    to sort your problem do this...
    1. Open your iTunes folder in the Home Music folder and make a backup copy of the iTunes Library file and put on the desktop.
    2. Start iTunes and in the Library sort on the Heading 'Date added' ... you may need to install it... control/click on heading-bar and select from popup menu.
    3. When you have sorted scroll to half way and you will see the songs are split evenly... select the ones you want to remove with a shift/click and hit delete key... say no about move to trash for now.
    4. Check that everything is as you want it... if so carry on... if not come back and tell me what happened.
    5. Quit iTunes and put the iTunes Library file in the iTunes folder in a safe place like your Documents folder... drag the copy from desktop and put it in the iTunes folder.
    6. Check the name is correct on the 'copy' edit it to be iTunes Library.
    7. Start iTunes by double/clicking on the file and go through steps 2 & 3 again but this time when you delete say yes about move to trash... don't empty it yet 1st check that all is OK with your library.
    You can edit the good files that you are left with but the addition of '01' in the name will not have any adverse effect on them at all... editing with an Applescript is very easy.
    take care Jeffe and let's know how you get on or if you run into any unforeseen problems ... TP

  • Acrobat 5.0 How do I keep the original file name after I have converted a Word doc to PDF?

    MY colleague has a certain setting in Acrobat that allows him to keep the original file name when he converts documents from Word to PDF. Every time I convert Word, Acrobat overwrites the filename and names it "untitled.pdf". I would like to retain the original name and for Acrobat to simply add the .pdf file extension to the original name. How do I do this?

    I have no idea what you are doing for sure. Does your WORD document have a name. I opened a WORD document and selected the Acrobat Distiller printer for AA5, I got the file menu for selecting the name and it was automatically filled in with the DOC changed to PDF. If you are using PDF Maker, then you will need to search there - I removed PDF Maker for AA5 years ago and can't view that part. I see the same types of options in PDF Maker for AA8.1.2 as I saw in the printer for AA5 and guess it is the same. The untitled.pdf suggests that you never saved the original DOC file so it has a name.

  • Diappearing photos replaced by an exclamation point within a triangle.  Prior to loading Lion I could put the image number in finder and locate the original file for that photo.  How do I restore photos now?

    I had problems with photos disappearing and being replaced by an exclamation point within a triangle.  I can see the photo in the thumbnail summary but when you click on it, the screen goes black and the exclamation point within a triangle appears along with the info on the original image number (i.e., img_1120.jpg). Prior to loading Lion, I could go to Finder, enter the image number and locate the original file for that photo.  I could then restore it for editing, copying into Print Shop directly, etc.   That no longer works after installing Lion.   How do I restore photos now?  I have 100s of photos that I have been going back to the original files and restoring and I am frantic that I will no longer be able to get to the original files.  Please help!  Thanks

    The ! turns up when iPhoto loses the connection between the thumbnail in the iPhoto Window and the file it represents.
    What version of iPhoto? Assuming 09 or later:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Does 'save as' in 10.8 overwrite the original or result in loss of the original file?

    Is it true that the restored using "Save As" in Mountain Lion results in loss of the original file?  I expect "Save As" to result in saving a separate file under whatever name is assigned to it while leaving the original alone. There was a post elsewhere online today to the effect that unless one or another preference is globally set for the Mac using Save As will just result in renaming the file; the original will be lost unless it can be retrieved from Time Machine or elsewhere. What is the truth here?  I understand that third-party apps (say, Photoshop) maintain normal "Save" and "Save As" behavior but that using Apple apps or others that employ the OS's saving scheme manifest this behavior. If this is true and not remediable then I'll probably leave the Mac platform after 24 years once my 2006 Mac Pro is left too far behind. This one's a deal breaker for me though the thought of using Windows 8 leaves me cold too.

    As someone online noted:
    "In Apple's brave new world, there is no "Save" or "Save As". Everything you do is recorded, and you can always go back to previous versions of your work. There is no real destruction. It's just not working the way we want it to work.
    Apple shifted the paradigm out from under our feet. I too find myself lost. In software support, this is known as a "problem occurring in the first half of the 'user interface'". For over 50 years, computer users have had to explicitly save their work. You didn't save it, it was lost. We even got into the habit of saving our work every so often in case the computer crashed, and hours of work was lost. The original Mac's big contribution: It reminded us to save our work when we quit the program. Now, there is no more save, and we can't wrap our minds around it."
    From what I understand BOTH FILES will be saved with the changes - but what "Save As" should do is allow the copy to be saved with the changes and the original to stand alone. The whole business is a mess and nothing I want to deal with. I don't want the ORIGINAL file autosaved with my changes nor do I want to have to go fishing to figure out which version is the one I started with at that session.

Maybe you are looking for