Trying to Scan in a List of Names Using a Delimiter from a Text File

Hello everyone,
I tried posting this question onto [Codecall Forums|http://forum.codecall.net/java-help/16064-trying-scan-list-names-using-delimiter-text-file.html] for an answer, but nobody really helped to solve this problem, so I'm reposting it here.
I'm trying to solve this problem on the Euler Project for practice. For the first part of the problem, I am supposed to scan in names in the following format: "name1","name2","name3". To solve this, I wrote the following code:
import java.io.*;
import java.util.*;
public class AlphabeticalSort
     public static void main(String args[]) throws IOException
          //import the file
          Scanner input = new Scanner(new File("names.txt"));
          input.useDelimiter("[\",]");
          System.out.println(input.delimiter());
          //scan it for the length of the array
          int n = 0;
          while (input.hasNext())
               input.next();
               n++;
          System.out.println(n);
          //import the names into the array
          Scanner input2 = new Scanner(new File("names.txt"));
          input2.useDelimiter("[\",]");
          String[] names = new String[n];
          for (int i=0; i<n; i++)
               names[i] = input2.next();
               System.out.println(names);
}However, when I tested this with a file containing "BOB","STEVE","MARK", n equaled 7 and my output was the names each separated by two empty lines.  There are other methods I can use to solve this problem, but I would really like to know why my delimiters are not working so I can use them in the future.
Thanks,
helixed
Edited by: helixed on May 14, 2009 10:52 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Take a look at [Quantifiers in Java regex|http://java.sun.com/docs/books/tutorial/essential/regex/quant.html].
I believe "[\",]+"{code} will get you the results you need.
Edited by: nogoodatcoding on May 15, 2009 11:54 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • File name to be generated from outbound text file data

    Hi Experts,
    I am collecting IDOCs and generating  IDOC-XML(for IDOCS) file and sending it to PI 7.0 using sender file adapter.
    This is File to File scenario.
    IDOC-XML file picked by sender file adapter gets transformed using XSL mapping in to .dat(text) file.
    Sample Output of .dat file (target file)
    STR SE 2008-10-3011:13:00$SEQ
    EIH21148862                        D2008102820081127SEK000000894800000000894800000000000000 0000XYZ co Ltd                KL25533781          2114886209                    335592                        2508867                      
    EIL21148862                                   0000000000000000100000000000020081021  335592   20081010KILLL899       Operating System
    Now I want output file name to be: ABC_DEF_cc_yyyymmdd_segno.dat
    ABC_DEF is constant
    cc - means country code, in this case it should be "SE", which is marked in bold immediately after STR.
    yyyymmdd - date format
    segno - which means no of records like number of lines in text file, (say three records: STR, EIH, EIL)
    Please feel free for any clarifications required.
    I hope I am able to explain scenario.
    I would really appreciate if you can help me with your valuable inouts.
    Thanks,
    Divyesh

    hi,
    just put one more mapping as the last mapping in your interface mapping
    it can be abap or java mapping
    then as per this blog fill out Filename attribute which will set the file name
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    you can parse the whole IDOC structure in tthose mappings to get all the data you need for the filename
    this is the easiest way I'd say
    Regards,
    Michal Krawczyk

  • Creating a list of names and putting them into a computer file

    I am trying to create a list of names which is generated by a swf file that contains buttons representing letters of the alphabet. The user generates a name by clicking on the letter buttons until the letters of the name have been spelled out and then clicking on a “Submit” button to add each name to the list. The names are generated inside the swf file but I want the list of names to be deposited in a file within a folder of the computer and remain there as a permanent record after the swf file has been closed. I can do the Actionscript 3 programming associated with the letter buttons but I would like to know how to send the names to the computer file.

    Here is some simplified code which illustrates the problem I am having. I have four buttons A2_btn thru D2_btn. These buttons can be clicked to put a sequence of letters into the input text window called requestedItem_txt. The button called submit_btn can be clicked to put the sequence of letters (preceded with a comma) into the window called requestedItemList_txt and append the sequence of letters (and comma) to whatever is already in the window. This part is working satisfactorily. I also want to write the contents of the requestedItemList_txt window into a file on my computer as a permanent record each time the submit_btn button is clicked. I get an error message for the flush statement and I don’t get any file written on my computer. This problem completely baffles me so I would appreciate any help you can provide.
    A2_btn.addEventListener(MouseEvent.CLICK, btnA2Press);
    function btnA2Press(event:MouseEvent):void
        requestedItem_txt.appendText("a");
    B2_btn.addEventListener(MouseEvent.CLICK, btnB2Press);
    function btnB2Press(event:MouseEvent):void
        requestedItem_txt.appendText("b");   
    C2_btn.addEventListener(MouseEvent.CLICK, btnC2Press);
    function btnC2Press(event:MouseEvent):void
        requestedItem_txt.appendText("c");
    D2_btn.addEventListener(MouseEvent.CLICK, btnD2Press);
    function btnD2Press(event:MouseEvent):void
        requestedItem_txt.appendText("d");
    var sharedOb:SharedObject = SharedObject.getLocal("savedData");
    var flushResult:Object = sharedOb.flush();
    submit_btn.addEventListener(MouseEvent.CLICK, submit_btnPress);
    function submit_btnPress(event:MouseEvent):void
        requestedItemList_txt.appendText(","+(requestedItem_txt.text));
        requestedItem_txt.text = ("");
        SharedObject.getLocal("savedData");
        trace(SharedObject.getLocal("savedData"));
        flush("requestedItemList_txt.text");
    stop();

  • Reading parameters lists from a text file

    Hi All,
    Using CR XI R2 with VB6  and external .rpt files - - - - -
    In a VB6 app I use VB to loop through my tables to create dynamic parameter lists (CR XI is limited to the number of parameters it can create from the table). This works well but each time the user refreshes the report the same code is run to re-create the parameter list which is redundant and slows down the report(s).
    Is it possible to manually create a series of text files - say each morning - and then read the parameter lists from the text file(s) at runtime instead of doing it on the fly each time?
    Thanks in advance!
    Peter Tyler
    Geneva - Switzerland

    I find this sentence confusing:
    Is it possible to manually create a series of text files - say each morning - and then read the parameter lists from the text file(s) at runtime instead of doing it on the fly each time?
    Typically, runtime means on the fly - I think...
    So, I'm not sure if you are trying to read a saved data report and filter that saved data so that you do not have to hit the database(?).
    Creating a text file is beyond the support of this forum, though that should be a trivial exercise. Reading a text file and passing the results to a parameter is the same thing you are doing already, so I'm not sure where the hang up would be here(?)
    Or - rather than creating a text file, why not create a temp table and query it as you do when you loop through the tables to create dynamic parameter lists(?).
    I'm pretty lost here...
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • HT3275 Time machine at home and it will not allow me to remove the listing of my external hard drive from the excluded files list.

    Please help guys, I have a Time machine at home and it will not allow me to remove the listing of my external hard drive from the excluded files list.
    I am trying to use time machine to back up the hard drive. For backing up from Macbooik pro and Imac, there is no problem. It seems to not want to allow the external drive to be removed from the Excluded list and as such will not back up from it.
    Is there a way to be able to transfer files (music, movies etc) to time machine, format the external drive then put the files back to hard drive?
    Sorry it is a long winded question but it is driving me nuts that I cant sort this out.
    The <Macbook and Imac are both running mountain lion.
    Thanks Guys

    As for the hard drive to which you have never been able to write, is it by any chance in NTFS format? OS X can read NTFS for importing files, but it does not contain code for writing on an NTFS volume. That's a choice, not a bug.
    There is third-party software available to install NTFS-writing capability into OS X. An example is Paragon NTFS for Mac OS X. Another alternative would be to use a disk format that both Macs and Windows systems can use for both reading and writing; this would require either a new drive or erase the existing data.
    If by "the new system software" you mean OS X 10.9 Mavericks, you may want to repost that portion of your query in the Mavericks forum at https://discussions.apple.com/community/mac_os/os_x_mavericks . I haven't made the leap yet.
    I don't know what other problems you have been having, so I cannot comment on them. You don't seem to have any other recent postings on these forums.

  • Reading data from a text file into PAS - Dimension member names truncated

    Hi,
    I created a procedure to dump variables and data into a text file to load into another model. I used a semicolon as a field seperator.
    The data, measures and dimension members are dumped properly into a text file and no dimension member names are truncated .
    However when I read the data into  a measure, and I issue a peek command, dimension meber names are read in truncated
    and remain full names in the text file. Any reason for this? What do I need to do to prevent this from happening?
    THanks.
    Lungile

    Hi Lungile,
    The problem that you're likely having is that you haven't created a file description for the file from which you're reading.  When loading data into Application Server from a text file, you would normally go through three steps:
    1. Enter the ACCESS EXTERNAL subsystem
    2. Specify the name of the file to be read
    3. Specify the format of the file field names, types, widths, and positions.
    If you go into the Application Server help, select "Application Server Help", then "Application Server at the command level", then "Variables and reading in data", and then "Reading an external file", you will have the process of the steps you need to follow outlined for you, including links to the help topic for each command you need to issue.
    So what I think you need to do is use the DESCRIPTION command to specify the names of your fields, their type, and also their width, in order to ensure no truncation of data on the load.
    The same DESCRIPTION statement is required if you want to use your text file as the source of a dimension.
    Hope this helps,
    Robert

  • Ability to create a collection from a text file containing the names of the pictures

    1 thing that would be very good is the ability to create a collection / quick collection from a text file that contains the names of the picture we want in that collection...
    The reason for that is when i receive an order from a customer typicaly 100-200 different pictures (i'm a wedding photographer), i ask my customer to send me an excel spread sheet with all the name or number of the picture thay want with size & quantity...
    I would like to be able to use that file as an input for a batch job that would add all those files to a collection "customer order" instaid od adding them 1 by 1... it would save me lots of time and would prevent some errors in the order...
    I am currently able to do that with the help of a small utility (Useful File Utility) is the name... with the other RAW converter i use... Bibble

    Well, it is workflow software, true, but it's really focussed on image development. What you're proposing would necessarily make the primary focus be on the business angle, I suspect.
    If you're talking about tools to help customers sit down and pick what they want for manual processing later, that's one thing - but going the rest of the distance to order processing and fulfillment would be out of scope, at least in my view. The reason is that there is just so much room for potential variation in how this gets conducted that I can't see how Adobe could possibly satisfy every pro with one implementation. Even just dealing with all of the possible payment vendors is a hugely problematic area.
    I agree with Don; a third-party plugin via the upcoming SDK might be a distinct possibility, particularly if it were for a "plus services" solution in which the plugin were designed to work with a specific fulfillment vendor. THAT could work quite nicely, and the plugin might even be free (in return for giving the vendor your business, of course).
    In other words, it's not that I see it as a bad idea, it's just that I don't think it belongs in the "core" of LR. This is something that is best dealt with using the SDK so that differences in processes can be allowed for.

  • How would I export a list of songs on an iPod to a text file?

    I found one of my old iPod shuffles that's synced to an old PC that is long gone... I'm looking for a way to export what's currently on the iPod Shuffle as a text file or something so I can remember that "phase" in my life in the form of a playlist. I used to be able to do this in iTunes 10, but not quite sure how in 11+. Does anyone know how to do this?

    If you are able to connect the shuffle to iTunes and show its list of songs, it may be best to take a screen shot of iTunes window at max size.  Scroll the list and take additional screen shots as needed. 
    NOTE:  There is a command in the menu bar to
    File -> Library -> Export Playlist...
    Give this command with the shuffle's Music list selected in the sidebar.  However, this command is meant to create a text file that is later imported into iTunes, so it is not formatted to be nicely readable to human eyes.
    iTunes 11.x may hide the sidebar (along left side of window).  To show the sidebar, from the menu bar, under View, select Show Sidebar.  To show the list of songs on the shuffle... 
    • If the shuffle is 3rd or 4th gen, find the shuffle in the sidebar, under DEVICES.  Click the small triangle to the left of the shuffle's name, to drop down its content list (indented below the shuffle).  Click on Music there. 
    • If the shuffle is 1st or 2nd gen, the shuffle itself is one playlist.  Select it in the sidebar, under DEVICES, so that its Settings screen is shown to the right.  Toward the top, where is says "Settings," click on On This iPod (to the right).
    You can actually off-load the song files from the shuffle.  You cannot use iTunes to do this (except for songs purchased from the iTunes Store), but there are third-party methods and utilities that can transfer song files from iPod to computer.  If you do an Internet search on something like "ipod transfer," you should get some links.  (The CNET article seems to be popular.)
    Once the song files are on the computer's drive, I suggest you create a new playlist in iTunes, and name it appropriately (like "Old iPod Songs").  Show the song files in an Windows Explorer window, and drag them to that playlist in the iTunes window.  iTunes will add the songs to the (general) iTunes library, but that playlist will only show the songs that were on the shuffle.  And you can actually play the songs for a shot of "nostalgia" (not just look at their names).

  • How can I change the file version for scanned PDFs to 1.4 when using the "PDF from Scanner" feature from Acrobat XI? By default it's always saved as 1.5.

    Because our IT system can only handle PDFs with versions up to 1.4, we need to "PDF from scanner" feature to store the scanned PDFs in version 1.4.
    Acrobat 9 always saved it in 1.4, but starting with Acrobat X, the PDFs are saved in 1.5.
    There must be a setting or configuration somewhere where I can change this.
    I already tried modifying the distiller's standard joboptions, but that did not work.
    Thanks for any help

    We use in our software an open-source pdf library that only supports pdf versions up to 1.4. I know it is old, but it's not that simple to exchange it.
    But I just had a look into the Actions as you suggested. This way I get it to work. It costs one additional click, so that's acceptable.
    Thanks for the support.

  • Using a lookup from one CSV file to another CSV file errors with a name clash

    Hi
    I have a master CSV file created by querying the AD. I need to populate the "Team" attribute by doing a lookup using Name against  the Name Column any of 6 CSVs,  someone has prepared for me .  The problem is the data is inconsistent
    in the 6 CSV files so Name can hold either the Name or Username i.e. SAmAccountName or LoginName
    Now my ps script works when the data is good. but I have around 30 exception cases whereby there is a mismatch .  To explain:
    is in this line ( see the big code block below) 
    $userObject = $nameAndTeamCsvData | Where-Object {$_.Name -eq $masterUserName}
    The $_.Name is using the top level masterCSVData Name but I was hoping that it was using the
    $nameAndTeamCSVData.Name  as in only within the scope of the Where-Object {} ..I guess I have misunderstood the syntax of what I had written.
    . A quick a dirty fix would be rename this column in all of the 4 spreadsheets or trying to fix the code.....
    # now update the empty team value for user object
    $csvMasterData | ForEach-Object `
    $masterName = $_.Name
    $masterUserName = $_.Username # to deal with exception cases
    #force scope to as the properties in the outer with the same name should be out of scope
    # lookup the Name to see if we can extract the user's Team
    $userObject = $nameAndTeamCsvData | Where-Object {$_.Name -eq $masterName }
    # deal with the situation where the name in the businesses spreadsheets is actually the Username (login name) in the master csv
    if ( $userObject -eq $null )
    # lookup the username (loginname) to see if we can extract the user's Team # !!!!error occurs here with the $_.Name !!!!!
    $userObject = $nameAndTeamCsvData | Where-Object {$_.Name -eq $masterUserName}
    if ( $userObject -eq $null )
    $_.Team = "UNKNOWN"
    else
    # replace the mastercsv.Team with the one we have looked up
    $_.Team = $userObject.Team
    else
    # Name matches so replace the mastercsv.Team with the one we have looked up
    $_.Team = $userObject.Team
    Daniel

    I see your challenge.  How about collecting the column names in an array and looking for the potential names?  Following my example before, try this:
    $dataColumns = $I | Get-Member -MemberType NoteProperty | Select-Object -ExpandProperty Name
    Now, you can loop through the names and collect the appropriate data.
    if ($dataColumns.Contains('Column1'))
        #add ForEach-Object { $_.Column1... }
    HTH
    ~fr3dd
    Hi I had to wait until Friday as I have someone  ( my boss) checking the business & team csv files against valid usernames and names. 
    # now update the empty team value for user object
    $nameAndTeamCsvData | ForEach-Object `
    $nt_name = $_.Name
    # $masterUserName = $_.Username # to deal with exception cases
    # lookup the Name to see if we can extract the username and mobile from the masterCSV
    $userObject = $null # Replace my original code: $csvMasterData | Where-Object {$_.SName -eq $nt_name } # with foreach code below
    $uo = $null
    foreach ($uo in $csvMasterData)
    if ($uo.SName -eq $nt_name)
    $userObject = $uo
    # ouch can't break out of this even though I found it so have to move on to the next
    }if ( $userObject -ne $null ){ #  Name matches so   replace the few propeerties in  mastercsv.Team with the ones we have looked up
             $_.Username =$userObject.SamAccountName
             $_.Mobile =$userObject.Mobile
    This does work but is clearly not very efficient since I don't think I can
    break or exit out of the foreach loop.  I am thinking I could quickly modify and add your code - my import is delayed as I am having a new property added to user class...  Let me know what you think.

  • How to copy a files name and spotlight comments to a text file for an entire folder

    I have movie covers saved as a jpeg for every movie my family and I own. There is about 700 and they each have a comment of the main actors, release dates, and descriptions. This makes it easy to find what to watch. I want my parents to have all of this info but they have a windows laptop so the comments don't transfer with the file and can't be searched like you can on a mac. Is there an applescript, automator, program I can download,  or program code supported in xcode that will do at least one of the following things?
    1)Take the name of the picture file and spotlight comment, copy and paste it into a text document like word that looks like this...
    File Name1- Spotlight Comment for file 1
    File Name 2- Spotlight Comment for file 2
    . for all 700 files in a folder
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    3) Is there a free photo program that works on mac and windows that I can put all my movie pictures in and have a description like I did with the comments? It would also need a place that to search the description for keywords. So Basically an itunes for pictures that works on both mac and windows. If so I still need a way to get the spotlight comments to the description.
    4) I feel like this would make things more difficult, but if not I can put all of the .m4v files in itunes so instead of pasting all the comments back into a file in finder paste them in a description in itunes
    5) At the very least a code that I can run one by one for every file that will paste the comments into the same document
    Note: When I say spotlight comments I mean the comment box that is available when you click on get info of a file. The pictures are in the pictures section of finder in a folder called Movie Pictures. The movie files are on an external hard-drive in a file called Movies. Also I am slightly familiar with applescript and automater in that I have used both to create keyboard shortcuts and simple voice commands. I have programmed in c++ and C too. So If you give me a code for applescript I do know what to do with it.
    Thanks to anyone who takes the time to read all of this and extra thanks to anyone who tries to help.

    Clendenen02 wrote:
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    This Bash script will do it.
    Edit "PicDir" and "MovDir" to the location of your Folders
    (Note: The comment is written to the m4v file using xattr, so the Spotlight comment field appears blank in Finder, but the comment metadata is still indexed by Spotlight (If you add a Spotlight comment from Finder, it is stored both as an extended attribute and in a .DS_Store file)
    #!/bin/bash
    PicDir=$HOME/Desktop/Pictures
    MovDir=$HOME/Desktop/Movies
    for f in $PicDir/*
    do
         if [ ! -d "$f" -a "${f##*.}" == "jpeg" ]; then
              comment=$(mdls -raw -name kMDItemFinderComment "$f")
              if [[ $comment != "(null)" ]]; then
                   picname=${f##*/}
                   movname=${picname%.*}.m4v
                   if [ -e "$MovDir"/$movname ]; then
                         xattr -w com.apple.metadata:kMDItemFinderComment "\"$comment\"" "$MovDir"/$movname
                   fi
              fi
         fi
    done

  • How to print a list of keyword tags in PSE7 from the XML file?

    When choosing keyword tags to add to photos it would be useful to have a printed list, structured in categories and sub-categories. The "Save Keyword Tags to File" command just produces an XML file that seems to have all the data, but I don't have any applications that will open it properly. IE and Netscape just show the XML tags without interpreting them. Netscape complains about the lack of styles. Is that what I need?

    Hello Fred
    This is what I do in Windows XP Home.
    Click on Start
    Click on Run
    In the Open window type: C:\psedbtool\psedbtool-csv file
    (yes, that is a space between csv and file)
    Click on OK
    You then get a black window that steadily gets filled up with information. If you've got a PSE catalog the size of mine, when it says "Checking for missing files" and "Writing files" you may think everything has stopped, but wait, percentages will appear, working up to 100%. You will find the four files in a folder called C:\psedbtool
    Take note of what John Ellis says in the .html document about using csv files.
    Good luck

  • Mail program not listing which account used in the From: and To: descriptions

    I have two separate email accounts, iMap and POP, that I access and use with the Apple Mail program in Snow Leopard. In the past, I could click on my name in either the To: or From: box and see which account/server the email came into or from. A while ago, that info started being less available for some reason. Now, it is never available. I can see the source (email address) of other peoples emails, but not mine.
    This is all I see when I click on my name:
    Copy address
    Reply to Sender
    New message
    Open address book
    Create Smartmailbox
    Spotlight:"My name"
    When I click on other names, I can see their email address. Never for my name, even though I will use two different email addresses depending on whether it is work-related or not.
    This is annoying and seems like a feature has been changed. I can't figure out what setting I need to flip. What's goin on?
    Thanks,
    Nick

    By default, Mail will always sent new messages from the account that is currently "selected" (ie, you have selected one of that account's mailboxes).  However, you can easily change this in Mail's preferences.  Choose Mail -> Preferences, then select the Composing tab, then change the pop-up menu next to "Send new messages from" to the desired account.

  • Batch list import is picky about line terminations in the text file

    After running into trouble trying to compose a batch list for import, I isolated the issue:
    The text file that you attempt to import must have "carriage return" characters at the end of each line. It can have a "carriage return" and a "line feed", but it cannot have only a "line feed".
    If you feed Final Cut a text file that does not meet this criteria, it will barf up this error message:
    One or more items on the header line do not match valid Browser column headers.
    Line terminators have been the cause of many a problem over the years! Typically, MSDOS/Windows systems tend to create text files that use a CR-LF combo. While Mac OS was typically just a CR. And UNIX systems have typically been just an LF. However, since Mac OS X is now a hybrid of older Mac ways, and UNIX ways, you can find mixed situations there. For example, the Mac OS X Text Edit program saves out files with just an LF, and thus can't be directly used to create batch lists for Final Cut.
    So, you need to be careful what means you use to create batch list text files.
    Hope this helps some poor soul some day!
    -Rick

    I am trying to export a batch list created in FCP 5.1 to someone with 6. I follow directions, export and save and then e-mail the file. When he tries to import it, he gets that message ("One or more items on the header line do not match valid Browser column headers"). But I have tried re-importing it from my desktop and have no problem. Is there a problem going with such simple data from 5.1 to 6? Is it possible that the e-mail transmission is corrupting the files?
    Thanks for suggestions.

  • Get-VM to list VM name only

    I am using following command to generate text file of all Windows servers that are powered on
    Get-Vm where {$_.guest -match 'windows'} | where {$_.PowerState -eq 'PoweredOn'} | Out-File D:\Scripts\SL.txt
    This generates list with following information :
    Name                 PowerState Num CPUs Memory (MB)
    What I really want is to generate list with name ONLY and and omit PowerState Num CPU's Memory.
    Yasar

    Thanks Mike
    That works too only I want to avoid the heading itself being included in the text file, in other words :
    Name    < ----- Exclude                                                                   
    ------     < -----  Exclude                                                                  
    VM1
    VM2
    VM3
    I did find that  Get-Vm | where {$_.guest -match 'windows'} | where {$_.PowerState -eq 'PoweredOn'} |
    Format-Wide -Column 1 |  Out-File D:\Test\SL.txt will also do similar which is great learning PS as I go  but how to exclude this not sure. Reason : I am running script to read  sl.txt  which is list of my VM, and then query
    drive space and email HTML report. If I have other parts then script run but has some errors
    Yasar

Maybe you are looking for

  • My new TomTom doesn't seem to work with my MacBook Pro (OS version 10.7.2). Is there any way I can make it work?

    The message that comes up when I click on "TomTom Home Install" is "You cannot open Home Install because Power PC applications are no longer supported." Does this mean that the TomTom, which is absolutely vital to my life - well, not literally but yo

  • Problems playing and hosting online games via AEBS.

    Okay, I'm officially stumped. I've been trying to setup my AE base station to play a Command & Conquer Zero: Hour multiplayer games via Game Ranger. I'm connecting via Ethernet using an AE Router address of 10.0.1.1 and a computer IP address of 10.0.

  • Date Calculate difference between 2 days using DateField

    Hi, I have 2 dateFields on stage. I hav2 a text box ,which I want to display, the number of days difference, when I select datefield1 and then datefield2. The code I have is not working, can you please point me in the right direction ? I have done th

  • "Log On" screen with new token

    Hello, I have an ASP.NET app which is opening a separate report window (IE browser instance). Each time I open this window to generate/view a report, I call CreateLogonTokenEx() to get a new token to pass to BOE. Is this the correct method? If so, th

  • Linking PO data with Merch Receipt

    I am creating a Merchandise Receipt form using a PervasiveSQL database in Peachtree. The merchandise receipt template in PT is populated from a purchase order.  I am having trouble bringing in 2 fields from the PO.  PO date & PO order quantity for ea