command prompt

ron2fs

New Member
#1
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
 


Josephur

Windows Forum Admin
Staff member
Premium Supporter
#2
Sure go ahead, but if you haven't used PowerShell yet, you should migrate to it.. way more powerful :)
 


ron2fs

New Member
#3
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
 


ussnorway

Windows Forum Team
Staff member
Premium Supporter
#4
Is there any way in which the font size can be increased?
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).png

Screenshot (45).png

Screenshot (46).png
 


ron2fs

New Member
#5
Hi ussnorway!
thanks for that properties tip - makes all the difference!
 


Josephur

Windows Forum Admin
Staff member
Premium Supporter
#6
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? :)
 


ron2fs

New Member
#7
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!
 


Josephur

Windows Forum Admin
Staff member
Premium Supporter
#8
You need to read up on how to use for loops.
 


ussnorway

Windows Forum Team
Staff member
Premium Supporter
#9
dir f:\pc*,co*\*\*\* >
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.
 


Last edited:

ron2fs

New Member
#10
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
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.
Top