Using the command prompt

Discussion in 'Computer Support' started by Fitzy_bhoy, Feb 21, 2004.

  1. Fitzy_bhoy

    Fitzy_bhoy Guest

    want to use the following command dir c:\***** > c:\*****.txt the plan is
    to then take that file into excel as a csv file to make a list. However I do
    not want the date or file size, only the filenmame.I have been using the
    command prompt in xp to do this.

    Thanks
    John
     
    Fitzy_bhoy, Feb 21, 2004
    #1
    1. Advertising

  2. Fitzy_bhoy

    Patrick Guest

    Fitzy_bhoy wrote:
    > want to use the following command dir c:\***** > c:\*****.txt the
    > plan is to then take that file into excel as a csv file to make a
    > list. However I do not want the date or file size, only the
    > filenmame.I have been using the command prompt in xp to do this.
    >
    > Thanks
    > John


    If at a command-prompt you type dir /? you will see all the
    parameters/switches available for the 'dir' command.
    Suggest that you try the 'b' switch, ie;
    dir drive:\path\filename.* /b
    ( note space between '*' and '/' )
    to see if this gives what you require.
    If this gives what you want then just add the output part;
    /space/">drive:\path\output.text"
     
    Patrick, Feb 21, 2004
    #2
    1. Advertising

  3. Fitzy_bhoy

    Fitzy_bhoy Guest

    "Patrick" <> wrote in message
    news:RfRZb.1735$...
    >
    >
    > Fitzy_bhoy wrote:
    > > want to use the following command dir c:\***** > c:\*****.txt the
    > > plan is to then take that file into excel as a csv file to make a
    > > list. However I do not want the date or file size, only the
    > > filenmame.I have been using the command prompt in xp to do this.
    > >
    > > Thanks
    > > John

    >
    > If at a command-prompt you type dir /? you will see all the
    > parameters/switches available for the 'dir' command.
    > Suggest that you try the 'b' switch, ie;
    > dir drive:\path\filename.* /b
    > ( note space between '*' and '/' )
    > to see if this gives what you require.
    > If this gives what you want then just add the output part;
    > /space/">drive:\path\output.text"
    >

    That was exactly what I wanted. But is there now anyway to list the files
    minus the file extension. The files in questions are zip and mp3 and would
    look better without the extension. Or can I bulk remove one word from excel

    John
     
    Fitzy_bhoy, Feb 22, 2004
    #3
  4. Fitzy_bhoy

    Patrick Guest

    Fitzy_bhoy wrote:
    > "Patrick" <> wrote in message
    > news:RfRZb.1735$...
    >>
    >>
    >> Fitzy_bhoy wrote:
    >>> want to use the following command dir c:\***** > c:\*****.txt the
    >>> plan is to then take that file into excel as a csv file to make a
    >>> list. However I do not want the date or file size, only the
    >>> filenmame.I have been using the command prompt in xp to do this.
    >>>
    >>> Thanks
    >>> John

    >>
    >> If at a command-prompt you type dir /? you will see all the
    >> parameters/switches available for the 'dir' command.
    >> Suggest that you try the 'b' switch, ie;
    >> dir drive:\path\filename.* /b
    >> ( note space between '*' and '/' )
    >> to see if this gives what you require.
    >> If this gives what you want then just add the output part;
    >> /space/">drive:\path\output.text"
    >>

    > That was exactly what I wanted. But is there now anyway to list the
    > files minus the file extension. The files in questions are zip and
    > mp3 and would look better without the extension. Or can I bulk remove
    > one word from excel
    >
    > John


    As far as I can see, with the 'dir' command, thiere is not any way to
    suppress the extension.
    However the task is easily accomplished within 'Notepad' useing the replace
    command ('Edit' menu, 'Replace').
    Just put in the 'Find what:' box .jpg (or whatever extension), nothing
    in the 'Replace with:' box, click 'Replace all'
    Of course you'll need to do same for each extension !
     
    Patrick, Feb 22, 2004
    #4
  5. Fitzy_bhoy

    Fitzy_bhoy Guest

    "Patrick" <> wrote in message
    news:aR4_b.1788$...
    >
    >
    > Fitzy_bhoy wrote:
    > > "Patrick" <> wrote in message
    > > news:RfRZb.1735$...
    > >>
    > >>
    > >> Fitzy_bhoy wrote:
    > >>> want to use the following command dir c:\***** > c:\*****.txt the
    > >>> plan is to then take that file into excel as a csv file to make a
    > >>> list. However I do not want the date or file size, only the
    > >>> filenmame.I have been using the command prompt in xp to do this.
    > >>>
    > >>> Thanks
    > >>> John
    > >>
    > >> If at a command-prompt you type dir /? you will see all the
    > >> parameters/switches available for the 'dir' command.
    > >> Suggest that you try the 'b' switch, ie;
    > >> dir drive:\path\filename.* /b
    > >> ( note space between '*' and '/' )
    > >> to see if this gives what you require.
    > >> If this gives what you want then just add the output part;
    > >> /space/">drive:\path\output.text"
    > >>

    > > That was exactly what I wanted. But is there now anyway to list the
    > > files minus the file extension. The files in questions are zip and
    > > mp3 and would look better without the extension. Or can I bulk remove
    > > one word from excel
    > >
    > > John

    >
    > As far as I can see, with the 'dir' command, thiere is not any way to
    > suppress the extension.
    > However the task is easily accomplished within 'Notepad' useing the

    replace
    > command ('Edit' menu, 'Replace').
    > Just put in the 'Find what:' box .jpg (or whatever extension),

    nothing
    > in the 'Replace with:' box, click 'Replace all'
    > Of course you'll need to do same for each extension !
    >

    Brilliant!!!

    I tried this in excel a few weeks ago and it didn't seem to work.
    Thanks you've just saved me hours of tedious editing.

    John
     
    Fitzy_bhoy, Feb 22, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bummer
    Replies:
    0
    Views:
    439
    Bummer
    Aug 23, 2003
  2. vince candline

    Re: how to start in command prompt using Win 98?

    vince candline, Aug 23, 2003, in forum: Computer Support
    Replies:
    0
    Views:
    506
    vince candline
    Aug 23, 2003
  3. Barry OGrady

    Re: how to start in command prompt using Win 98?

    Barry OGrady, Aug 23, 2003, in forum: Computer Support
    Replies:
    0
    Views:
    1,372
    Barry OGrady
    Aug 23, 2003
  4. Bucky Breeder

    ?Using command prompt like 'xcopy'?

    Bucky Breeder, Apr 7, 2004, in forum: Computer Support
    Replies:
    4
    Views:
    8,933
    JabberSmith
    Apr 8, 2004
  5. calvin
    Replies:
    0
    Views:
    480
    calvin
    Mar 8, 2006
Loading...

Share This Page