Solved

creating multiple folders

Posted on 1998-12-18
9
217 Views
Last Modified: 2011-09-20
Is there a way to create a folder with the same name under multiple subdirectories with one set of commands. I do not want to do it manually, it would take forever. This is on a netware 4.11 directory tree using Explorer.
Or perhaps there is a dos command.
0
Comment
Question by:jlmacek
  • 2
  • 2
  • 2
  • +2
9 Comments
 

Author Comment

by:jlmacek
ID: 1594471
Edited text of question
0
 

Expert Comment

by:demarb
ID: 1594472
To my knowledge no command exists in dos or in windows. I myself would write a simple program to do it for me if it is for a large number of directories.
0
 
LVL 4

Expert Comment

by:saar2
ID: 1594473
I tried to create such program for you but I didn't success.

Let me guess something...
Do you want to create under each user's home directory a new subdirectory?

If this is the situation, then do it from the login script.

After you map a drive (lets say T:_ to the home directory, run a batch file which will look like:

If Not Exist T:\Newdir\Null Md T:\Newdir

You might success doing this from the login script instead from a batch file.


Saar Carmi,
saar@bigfoot.com
ICQ#  3233305

0
ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 
LVL 4

Expert Comment

by:saar2
ID: 1594474
I am very sorry.

I did not mean to submit my comment as an answer.

Please reject my answer.

Saar
0
 

Author Comment

by:jlmacek
ID: 1594475

Saar errantly made his an answer when he meant it for a comment.

what i have is a pool of 9 directories with about 25 subdirectories, i want to create a folder in each subdirectorie, the folder will have the same name in each subdirectory
thanks
0
 

Expert Comment

by:demarb
ID: 1594476
If no other solution presents itself, a program could be written for you to create the folders you want, we would just need the information about what the directory would be named, etc.
0
 
LVL 4

Accepted Solution

by:
Zombite earned 100 total points
ID: 1594477
Dos prompt
Go to the top of the dir tree where you want to start.
Type dir *. /s > c:\list.txt

Will produce a file with directory names such as

Directory of G:\INFOSERV\Utils\NETTEST

              <DIR>                        .
             <DIR>                        ..
         0 file(s)              0 bytes

Directory of G:\INFOSERV\Utils\NETSAMP

              <DIR>                        .
             <DIR>                        ..
         0 file(s)              0 bytes


OPEN IN WORDPAD
Do a cleanup to leave directories that you want to create the new sub-directories in. ( Can be done reasonably quickly)


EG

Directory of G:\INFOSERV\Utils\NETSAMP
Directory of G:\INFOSERV\Utils\NETTEST

Replace Directory of  with mkdir command
add directory name to the end

MKDIR G:\INFOSERV\Utils\NETSAMP\newstuff
MKDIR G:\INFOSERV\Utils\NETTEST\newstuff

rename as batch file and run with correct rights to create
directories.

If particular rights need to be created, use same batch file and use flag command as required.


0
 

Expert Comment

by:anadrash
ID: 1594478
In cases like this I certainly propose a DOS batch file.

Step 1
------

First, from the parent of 9 dirs, issue the command:

dir /s/ad > create.bat

(the /ad option will show only the directories).

In case the 9 directories are not the only ones under
their parent directory you must use this command:

for %d in (dir1 dir2 dir3 ... dir9) do dir dir%d /s/ad >> create.bat
(this will append the "create.bat" with the subdirs
of each of the 9 directories.

Step 2
------

You must edit the file "create.bat" with a text editor.
This file will originally contain lines with the "tree"
of all subdirectories. You will add the command "md "
at the beginning of each line and the subdir "\name"
at the end of each line.
If you use Norton Editor you can issue a Replace command
where you will replace the "End of Line" with
"\name"+"End of Line"+"md " and it will do the job at once.

Step 3
------

If you do this job often you can automate it under conditions.
Are the 9 subdirs always the same? Are the 25 subdirs always
the same or changed rarely? In a case like this you can
create a permanent or rarely changed batch file where the
subdir name is a parameter and the job is done with a command
like:

create name

Thanks,
Yiannis

0
 

Expert Comment

by:anadrash
ID: 1594479
This is a comment on my comment.

I forgot the option /b which must be included after the dir
command together with the /s/ad options. The lines would be:

dir /s/ad/b > create.bat

and

for %d in (dir1 dir2 dir3 ... dir9) do dir dir%d /s/ad/b >> create.bat

This option will give you the directory names in bare format.
(no heading information or summary, just the names).

Thanks again,

Yiannis

0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Groupwise to pst 3 895
novell 6 and groupwise 4 422
Migrating from Netware 5.1 to Windows Server 2008 Standard R2 2 343
How do I image Dell Laptop 5 351
This article outlines the process to identify and resolve account lockout in an Active Directory environment.
February 24, 2017 — On February 23, Travis Ormandy, a vulnerability researcher at Google, reported on Twitter (https://twitter.com/taviso/status/834900838837411840) that massive stores of data have been leaked by CloudFlare, a company that provide…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question