Re: Command-Line Arguments

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jezebel (frolly_at_mkkk.com)
Date: 02/23/04

  • Next message: Rick Rothstein: "Re: Scientific Notation with Foo decimal places"
    Date: Tue, 24 Feb 2004 09:21:56 +1100
    
    

    Use the Windows standard: double quotes around strings that contain spaces.

    "John" <anonymous@discussions.microsoft.com> wrote in message
    news:BAC6D939-812C-489E-B487-CCC29CE4ED18@microsoft.com...
    > I use a very simple method of parsing the command-line to get the
    arguments, which are currently assumed to be space delimited. However, I
    need to make a change to one of my utilities to accept a fully qualified
    filename, including the path. This requirements means that I can no longer
    use space delimited arguments because paths and filenames can have spaces.
    >
    > What is the best method of passing arguments when spaces are integral to
    one or more of the arguments (i.e., filenames, paths, etc.)?
    >
    > Thanks,
    > John


  • Next message: Rick Rothstein: "Re: Scientific Notation with Foo decimal places"

    Relevant Pages

    • Re: Command-Line Arguments
      ... > I use a very simple method of parsing the command-line to get the ... > arguments because paths and filenames can have spaces. ... inside a quoted portion. ...
      (microsoft.public.vb.general.discussion)
    • Re: Command-Line Arguments
      ... Karpas ... > I use a very simple method of parsing the command-line to get the ... use space delimited arguments because paths and filenames can have spaces. ...
      (microsoft.public.vb.general.discussion)
    • Re: Command-Line Arguments
      ... Lenny ... > I use a very simple method of parsing the command-line to get the ... use space delimited arguments because paths and filenames can have spaces. ...
      (microsoft.public.vb.general.discussion)
    • Re: Command-Line Arguments
      ... > I use a very simple method of parsing the command-line to get the ... use space delimited arguments because paths and filenames can have spaces. ...
      (microsoft.public.vb.general.discussion)
    • Re: FindFirstFile, how much faster than FindNextFile?
      ... >substring in each of about 50 filenames, ... You have not specified how the 50 strings are specified. ... A number like 50 is so tiny that pretty much any in-memory algorithm that scans the ...
      (microsoft.public.vc.mfc)