command prompt

Discussion in 'General Computing' started by ron2fs, Sep 1, 2015.

  1. ron2fs

    ron2fs New Member

    Joined:
    Sep 1, 2015
    Messages:
    6
    Likes Received:
    0
    Hi everybody
    New forum member today (Sept1st); been working with computers since early '60s. Have just upgraded from Windows 8.1 to 10 - although my question is not about Windows 10 (or should I say - not yet!). I would like to know where to post a query about the command prompt; is this the right place?
    Ron
     
  2. Josephur

    Josephur Windows Forum Admin
    Staff Member Premium Supporter

    Joined:
    Aug 3, 2010
    Messages:
    1,019
    Likes Received:
    125
    Sure go ahead, but if you haven't used PowerShell yet, you should migrate to it.. way more powerful :)
     
  3. ron2fs

    ron2fs New Member

    Joined:
    Sep 1, 2015
    Messages:
    6
    Likes Received:
    0
    Hi Josephur!
    Thanks for your response; I've had a quick look at Power Shell - we shall see! Is there any way in which the font size can be increased? I have only used Cmnd prompt to create directories!!

    OK; I have often used the following structure to create a directory:

    dir c:\mytopfolder\myfolders\myfiles\/s > c:\mytopfolder\mydirs\dir_one

    I have a special requirement to create a directory form a USB stick in the F drive, but just for groups of specific folders; this suggests to me I should use wild cards and multiple file names. For example, I would like to create a directory of three groups of folders; the first letter of each group is "a", "b" and "c". Each group comprises sub-folders and files. I have tried the following without success:

    dir F:\ a*; b*; c*\/s > c:\mytopfolder\mydirs\dir_abc

    Your expert help would be appreciated to establish the correct syntax ( and for Power Shell)
    Ron
     
  4. ussnorway

    ussnorway Windows Forum Team
    Staff Member Premium Supporter

    Joined:
    May 22, 2012
    Messages:
    2,540
    Likes Received:
    318
    right click the top bar and goto properites... works the same basic way in both but some of the font options are different
    Screenshot (44).
    Screenshot (45).
    Screenshot (46).
     
  5. ron2fs

    ron2fs New Member

    Joined:
    Sep 1, 2015
    Messages:
    6
    Likes Received:
    0
    Hi ussnorway!
    thanks for that properties tip - makes all the difference!
     
  6. Josephur

    Josephur Windows Forum Admin
    Staff Member Premium Supporter

    Joined:
    Aug 3, 2010
    Messages:
    1,019
    Likes Received:
    125
    Ron,

    I'm not for certain I follow exactly what your trying to do by creating your directory structure, can you lay it out in layman's terms for me? :)
     
  7. ron2fs

    ron2fs New Member

    Joined:
    Sep 1, 2015
    Messages:
    6
    Likes Received:
    0
    Hi Josephur
    Thanks for your patience - I'm layman!

    Ok; I've been experimenting with, and switched to power shell - and can now read the scripts easier.
    I have a USB in the F: drive with about 50 folders; each folder contains sub-folders and files. Something like this :

    dir f:\*\*\*\* > C:\mydirs\dirone.txt

    works and gives me a directory in .txt format which I can import into excel for later use. However, dirone is enormous and almost impossible to work with. I want to be more selective and only create directories of top folders beginning with specific letters. Thus I can do something like this:

    dir f:\pc*\*\*\* > C:\mydirs\dir_pc.txt

    to give me a more manageable directory in dir_pc for all top folders beginning with "pc"; then create another directory for top folders beginning with "co"; i.e.:

    dir f:\co*\*\*\* > C:\mydirs\dir_co.txt

    This gives me two directories which I would need to combine to be useful - then a third, etc., etc. What I wold like to do (if it is possible) is combine pc* and co* in one command line:

    dir f:\pc*,co*\*\*\* > C:\mydirs\dir_pcco.txt

    which does not work! Can you tell if this is possible and what is the correct syntax? Many thanks. Ron. Smiley here!
     
  8. Josephur

    Josephur Windows Forum Admin
    Staff Member Premium Supporter

    Joined:
    Aug 3, 2010
    Messages:
    1,019
    Likes Received:
    125
    You need to read up on how to use for loops.
     
  9. ussnorway

    ussnorway Windows Forum Team
    Staff Member Premium Supporter

    Joined:
    May 22, 2012
    Messages:
    2,540
    Likes Received:
    318
    You need to define the path after a comma mate... my memory isn't that exact however as an example;

    dir f:c*\,\co*\
    or even
    dir f:c*\,c:\co*\
    should both work (,c: assumes the dir there different of course) but
    dir f:c*\,co fails because ,c isn't a path

    To be clear, that script looks too complex to me but basic syntax is a good start.
     
    #9 ussnorway, Sep 5, 2015
    Last edited: Sep 5, 2015
  10. ron2fs

    ron2fs New Member

    Joined:
    Sep 1, 2015
    Messages:
    6
    Likes Received:
    0
    Hi ussnorway
    Thanks for info.; I now have this syntax:

    PS C:\> dir f:\pc*\,f:\co*\*

    which works fine:up:

    **********************************************************************************************************************************

    By the time you're eighty years old you've learned everything. You only have to remember it.
    George Burns
     

Share This Page

Loading...