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. Advertisements

  2. Fitzy_bhoy

    Patrick Guest

    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. Advertisements

  3. Fitzy_bhoy

    Fitzy_bhoy Guest

    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

    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

    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. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.