How do I split a Large CSV file into Multiple CSV's Using Powershell

I am a novice at powershell but this looks to be the best tool to do this task. have a csv file that looks like this:
Date,Policy,Application
10/13/2014,No,None
10/13/2014,No,None
10/13/2014,No,None
10/13/2014,No,None
10/13/2014,No,None
11/14/2013,Yes,AppBiz
11/14/2013,Yes,AppBiz
11/14/2013,Yes,AppBiz
07/04/2013,No,PeopleBiz
07/04/2013,No,PeopleBiz
07/04/2013,No,PeopleBiz
07/04/2013,No,PeopleBiz
Is it possible to split this CSV into multiple CSV's based on "Application".
Lets say the output might look like:
None.csv
10/13/2014,No,None
10/13/2014,No,None
10/13/2014,No,None
10/13/2014,No,None
10/13/2014,No,None
AppBiz.csv
11/14/2013,Yes,AppBiz
11/14/2013,Yes,AppBiz
11/14/2013,Yes,AppBiz
PeopleBiz.csv
07/04/2013,No,PeopleBiz
07/04/2013,No,PeopleBiz
07/04/2013,No,PeopleBiz
07/04/2013,No,PeopleBiz
Any help would be greatly appreciated

I think this might be what you want:
Import-Csv applications.csv |
Group Application |
foreach {
$_.Group | Export-Csv "$($_.Name).csv" -NoTypeInformation
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Very nice! 4x faster..
I doubt the OP will get what you just did there..
Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable) _________________________________________________________________________________
Powershell: Learn it before it's an emergency http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx

Similar Messages

  • A pdf file failed to convert to word, presumably because of size.  how do i split a large pdf file into manageable secrtions?

    I'm running Abode Reader XI version 11.0.7.  Repeated attempts to convert a large (439 page) file, a dissertation, failed.  How do I split a large pdf file like this into manageable sections for conversion?

    Hi Mike,
    Your 11MB file is well within the file-size limits for ExportPDF, but depending on the number of pages, complexity of the file (and yours doesn't sound complex), and your connection speed, it is possible that the service is simply timing out before it can finish processing. These steps can help:
    If the file already contains editable text (that is, it isn't a scanned document), try disabling OCR as outlined in this this document: How to disable Optical Character Recognition (OCR) when converting PDF to Word or Excel.
    Clear the browser cache and try again.
    Try a different browser.
    Let's start there. If you still can't export the file to Word, let me know and we'll take it from there.
    Best,
    Sara

  • Splitting a large video file into smaller segments/clips using FCE

    Is there a way to split a large FCE / iMovie Captured event into smaller segments/clips.
    Am attempting to convert my home videos ( Analog: 8mm) into iMovie clips.
    Used a ADS Pyro that converts my composite signal ( RCA: Yellow+Red/White) to a digital signal via Firewire using the iMovie capture. However, this creates a single 2 hour file that takes approx 26Gb because there is now DV information.
    I would like to (a) Break this into smaller segments/clips then (b) Change the date on these.

    afernandes wrote:
    Thanks Michel,
    I will try this out.
    Do you know if this will create a new file(s) ?
    http://discussions.apple.com/thread.jspa?threadID=2460925&tstart=0
    What I want to do is to break up my 2 hours video into smaller chunks then burn the good chunks as raw footage ( AVI/MOV) onto backup data DVDs. Then export all the chunks into compresssed files (MPEG-4?) and save these on another data DVD.
    Avoid to compress. Save as quicktime movie.
    Michel Boissonneault

  • How do I split a large video file into seperate episodes/files?

    Hello all,
    I have a 52 minute long video that I need to split into 3 seperate files before I can edit it (so I can upload it to youtube as 3 separate episodes). I know how to split layers and do all the basic editing etcetera, but I am stumped on how to turn those split layers into separate files.
    Any help on this issue is much appreciated.
    Thanks in advance

    I thought of a work around that I should have thought of days ago. It can even be done in windows movie maker it's that simple.
    I will end up just splitting the original video clip and deleting the latter half of the video and saving the first clip and then reloading the original source file again and repeating the process with the following clip.
    I can include a little bit of the previous episode in the following one that way as well. Tried rendering the full 52 minute video but it ended up stuck on 99% so just stopped and I will go about splitting it in the above mentioned way.
    However, thanks for the comments both of you.

  • How to split large video files into multiple individual clips by date

    Hello. I'm looking for a freeware/shareware program (if one exists, or willing to pay for one if it does this well) that will:
    1) Analyze a large AVI file identifying the start/start points of each segment of video and the dates the video segments were shot.
    2) Then allow me to organize (for example, join 2 or more segments together if it's a video with a lot of start/stop points during the same shot) the segments identified in step 1 into logical clips that could be split apart from the 1 large AVI file.
    3) Lastly, it would split my one large AVI file into the multiple clips or files that I identified in step 2.
    A piece of software called FootTrack does a great job analyzing AVI files as I describe in steps 1 & 2, but it doesn't allow you to split or export the one avi file into multiple avi files.
    I really don't want to have to do this one clip at a time, I've got to believe there's a program out there that will automate this process for me.
    Thanks

    I don't know of a way to automate it. I just did about 15 years worth. It wasn't too hard. I use an application called mpegstreamclip. Its very easy and free to download either from the apple site or direct from its site.
    http://www.squared5.com/
    Bascically you set the in and out points with the i and o keys and export.

  • Importing CSV files into Multiple Tables in One Database

     I have a web based solution using Microsoft SharePoint and SQL Server that is created to centralize dat collection and reporting of program metrics used in montly reviews.
    A person from each program enters dat manual or by pushing the data using automated data import tools. The user then is able to generate reports and provide presentations to their stakeholders.
    There are are programs that are located in US and 2 that are located in Japan. All, including programs in Japan use the MS Project with a plug-in tool that allows them to auto input data. When the user click the "Send To.." button, the data goes
    in to multiple tables in one database.
    Everything is set up exactly the same for every program; however, we have discovered becase of a firewall, along with some of the different settings that the MS Project has over in Japan, the 2 program users are not able to auto import their data.
    The suggestion is to have the program users export the MS Project file into a CSV and email it. I will then take it and convert the data, such as the dates and place them on a Network Drive. There will be 2 folders, one for each program.
    I feel it will be an easy process just to load the data from the Network Drive into the same tables that are created for auto import.
    My Concerns/Questions:
    1. Should I create 1 SSIS package or should there be 2, one for each program?
    2. US and Japan program users send their data once a month. The converted files are going to be saved in the location marked with a date (ex:201402). How can i have it to where SSIS will automatically load the data every time i place new files in the designated
    folders or when i update an exsisting file?
    Can you provide an example with your suggestion please?
    I greatly appreciate the assistance!
    Y_Tyler

    Hello Vikash,
    Thank you! This will help me get started.
    There will be 2 folders, one with files with Program A data and the other with files with Program B data. All will have the same fields, just coming from different programs. You stated that I will be able to to load both in one package. Would there be two
    paths since there will be two separate folders?
    Using the example you provided, i am confident that I can create the package using one path into one table but not sure how to get the files from 2 paths (if there is) into multiple tables.
    Can you help clarify this for me?
    Thank you!
    Y_Tyler

  • How  to load the data from excel  file  into table in oracle using UTL_FI

    How to load the data from excel file into table in oracle
    and from table to excel file
    using UTL_FILE package
    Please give me some example

    This is something i tried in oracle apex
    http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
    Regards,
    CKLP

  • How to write file into multiple directories by using file adapter?

    i need to write my file into multiple directories,i able to do in single directory.But i need to write to muliple directories.Please help me out.Thanks in advance.

    If you are passing the values at runtime then you can loop it and and invoke the file adapter in loop by dynamically passing the value in invoke properties for "File Directory and File name" etc.

  • Trying to split one large audio file into tracks

    Hi;
    Awhile ago I mistakenly imported a CD into iTunes, as one large audio file, containing all 10 tracks. Now I'd like to know how to split this file back into it's separate tracks, and re-import into iTunes.
    Any thoughts?
    TIA.

    MP3 editor is a lossless editor for MP3 files.
    -> Fission, will do lossles editing of AIFF, WAV, MP3, AAc and Apple Lossless.
    You can do it yourself but the songs will be re-encoded (not lossless) but may not be a big deal.
    On the song, right click - get info. Click the Options tab and set the Start-Stop times for the first song.
    Then select the song, menu Advanced - Create AAC version {or whatever is selected in iTunes prefs -General - Importing}.
    This will create a new copy of the song between the time markers. Select the new song, righ click - get info and update the song title.
    Then on the original song, set Start-Stop times for the second song and menu Advanced - Create AAC version the for the 2nd song.
    Do this for all the songs in the original file.

  • How to import data from CSV file into a table by using oracle forms

    Hi,
    I have a CSV file and i want to insert in oracle database in a table by using a button in oracle forms.
    the user can select CSV file by using open dialog .
    can any one help me to find method to make import and select file from the client machine ?
    thx.

    1. create table blob
    CREATE TABLE IB_LOVE
      DOC          BLOB,
      CONTRACT_NO  VARCHAR2(20 BYTE)                NOT NULL
    )2. use the code below to insert:
           INSERT INTO ordmgmt.ib_love
                       (contract_no, doc
                VALUES (:control.contract_no_input, NULL
           lb$result :=
             webutil_file_transfer.client_to_db (:b2.file_name, v_file_blob_name, v_col_blob_name,
                                                 'CONTRACT_NO = ' || :control.contract_no_input);
           :SYSTEM.message_level := 25;
           COMMIT;
           :SYSTEM.message_level := 0;3. use the code below to download
         if :control.CONTRACT_NO_INPUT is not null then
              vboolean :=   webutil_file_transfer.DB_To_Client_With_Progress(
                               vfilename,  --filename                       
                              'IB_LOVE', ---table of Blob item                       
                              'DOC',  --Blob column name                       
                              'CONTRACT_NO = ' || :CONTROL.CONTRACT_NO_INPUT, ---where clause to retrieve the record                       
                              'Downloading from Database', --Progress Bar title                       
                              'Wait to Complete'); --Progress bar subtitle  client_host('cmd /c start '||vfilename);
              client_host('cmd /c start '||vfilename);                 
         else
              errmsg('Please choose contract no');
         end if;4. use the code below to open file dialog
    x:= WEBUTIL_FILE.FILE_OPEN_DIALOG ( 'c:\', '*.gif', '|*.gif|*.gif|', 'My Open Window' ) ;
    :b2.FILE_NAME:=X;

  • How do I turn a large pdf file into a hyperlink?

    Instead of downloading a huge file, I just want to send a link. How do I dothet?
    Thank you.

    Put it on a web site. Could be your own, or acrobat.com (but not sure how you;d make the file public). You can use a file sending service which makes this simple: Adobe sell "Adobe Send" to do this, there are many others.

  • How to break up a large .java file into several?

    Hi,
    I have a pretty large .java file containing many private methods. I rather not have to always work in this very large file. Is there a way to separate this into several smaller files, but to maintain the same relationship of all these private methods being part of the same class?
    Thanks in advance,
    Steve

    I thought that would be the answer. This is my first
    Java app. It uses Swing and I use NetBeans as my
    IDE.
    I knew it was getting too large, but I was trying to
    avoid having to reimplement the whole thing. I have a
    few more features to add and I can see this file
    growing by another 300-400 lines.You'll find it a lot simpler to write the second time round. You really don't want to have classes that big
    I do in fact have a couple other .java files where I
    created separate classes. Its just that I really need
    to rethink or redesign this whole thing.You do. Sounds like you've got one class that does too many things. What does this big class do? Adding new features shouldn't bloat your code this way

  • Trying to import from different csv files into multiple JTables

    This might seem like something that isn't commonly done, but I'll see if anyone has done this before anyways.
    I currently have a JTable (tab #1) and it successfully reads in the data from a CSV file to populate the cells. Now, I am looking into making 3 more JTables. I can tab between the four different tables, but I can't seem to figure out how to get the data to go to the correct JTable. Tab #1 = table, Tab #2 = table2, Tab #3 = table3, Tab #4 = table4.
    Thanks.
            try
                FileInputStream fileInput = new FileInputStream ("upcoming.csv");
                BufferedReader InputCSV = new BufferedReader (new InputStreamReader (fileInput));
                line = InputCSV.readLine(); //start reading into the records.
                    //Create data for the table.
                    //the row variable = starting row
                int row = 0;
                while(line != null)
                    tmp = line.split(",");
                    for (int col = 0; col < columnNames.length; ++col)
                        data[row][col] = tmp[col]; //store cells' data to the 2-dimensional array.
                    row++;
                    line = InputCSV.readLine();
                }//end of WHILE-statement.
            } //END of TRY-statement.
            catch(Exception e)
                System.out.println(e);
            }

    I have been successful in my quest to get 4 different datasets into 4 different JTables. The previous posters suggestion to use the Table model led me to this page:
    http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/table/TableModel.html
            TableModel myData = new MyTableModel();
            JTable table = new JTable(myData);I had some very similar code in my program. I use the DefaultTableModel and the SortFilterModel before having 4 different JTables.
            DefaultTableModel model = new DefaultTableModel(data, columnNames);
            DefaultTableModel model2 = new DefaultTableModel(data2, columnNames);
            DefaultTableModel model3 = new DefaultTableModel(data3, columnNames);
            DefaultTableModel model4 = new DefaultTableModel(data4, columnNames);I use the code in the first post 4 times, and only change the filename and the data#.
    I also have some code that counts the number of lines that will be needed.
    Thanks.

  • Need Script to split multi-paged ID file into multiple single paged ID files

    I have created a 366 page document (and have 2 more to create). None of the text threads from page to page, and there are no master page items. Each page is destined to be used as a single block that will be copied and pasted into a master document by a database driven plugin (and for color editing reasons it needs to be separate .indd files). For expediency, I created these as a single document because I could import the text with ID style tags to pre-format the text (with all text blocks threaded). I then broke all the text threads using API's Auto Unstich plugin. We then manually tweaked the text of each page.
    Gluon once sold a plugin called DocSplitter, but it has not been updated since CS1 and does not work with CS4.
    Before you ask why I don't have the database plugin create multiple single page docs — the plugin doesn't currently save to individual ID docs (yet - feature to be released in 3 months).
    I know that scripting could possibly do what I need, but I have little to no experience with AppleScript (7 years ago) and none with Javascript. Would love to find a pre-packaged solution and am willing to pay someone for it.
    To guess there are two ways a script could work:
    1) script breaks the doc into single pages (not sure how that would work really) but the files would be named based on page number — i.e filename-01.indd, filename-02.indd, etc.
    2) script selects all objects on a page, groups the objects, copies the objects, creates a new page, pastes the objects and then saves the file in the same manner as number 1 above - loop and repeat for al the pages.
    Any help would be greatly appreciated.
    many thanks
    Roger

    Hi Roger,
    This topic was discussed in this thread: http://forums.adobe.com/message/1113562#1113562
    Check out this script:
    http://creative.mediabox.fr/index.php?app=core&module=attach&section=attach&attach_id=6440
    Kasyan

  • How do I import Outlook Express message files into Outlook 2013 without using LiveMail

    I bought a new Windows 7 computer and have copied the Outlook Express .dbx files from the old XP computer onto the new one. Outlook 2013 's import facility does not have a .dbx option.  I  do not want to use Windows Live for anything. How do
    I import my Outlook Express mail files into Outlook 2013 ?

    Hi,
    It isn't only to Outlook 2013, other versions of Outlook cannot access the .dbx files directly.
    In the situation, Windows Live Mail is needed to transfer the mail data to Outlook.
    Best regards,
    Rex Zhang
    TechNet Community Support

Maybe you are looking for

  • P965 Platinum FSB is temperature dependent.

    After much testing with both the kentsfield and conroe and various video cards, cases, coolers, etc. I've come to the conclusion that the max FSB on this board is heavily dependent on temperature. In a cool case with a midrange video card I had no pr

  • How to measure thermocouple in lab view and save the data..

    hi.. i am using my DAQ with 2 analog channels.. i need to acquire signal from thermo couple i have T type thermo couple with brown jacket.. i have connected the thermocoupe in ai0.. and i selected the thermocouple type... when i select the built in o

  • Error:- No server was available to process the request. Please try again la

    Hi All, I have created a report in deskI and trying to execute it through WebI on a large database, but it gives the below mentioned error after almost 30 min. Error:- No server was available to process the request. Please try again later. (Error:RFC

  • Error while connecting to Visual administrator - Server0 getting Restarted

    Hi Experts, Kindly help me to Tune the JVM Parameters For AS Java ( Enterprise Portal 7) We are Having our Development Portal on a 32-bit Machine and recently we have migrated the same to a 64-Bit with SAP OS/DB. We are Using IBM DB2 9.1 Fix pack 2.

  • 3-Way Match Using FB60

    Hello,    We have a real strange scenarion here, let me explain. The client wants to do a 3-way match using a ZFB60, as in, validating the quantity and the unit price fields. Now, i do understand that the unit price field is not a column in FB60, onl