Discussion Locked

Copying to multiple directories

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I asked this in another area, thought I would move it here as the issue is on a W2K box.

I have a subdirectory that I need to create in multiple similar directories. I would prefer to accomplish this through automation rather than adding each individually, one at a time.

The structure looks something like below:

R:\Project Folder\xxxSeries\PRyyy\Current\Data\Tooling\ where xxx is a number 800, 900, 1000, 1100 etc. and yyy is also number inside that series x00-x99.
Example:
R:\Project Folder\800Series\PR851\Current\Data\Tooling\

I would like to add the subdirectory \3D to each of these (roughly 900 instances)
Example:
R:\Project Folder\800Series\PR851\Current\Data\Tooling\
to become:
R:\Project Folder\800Series\PR851\Current\Data\Tooling\3D\

I could use the XCOPY command with the /E switch to copy the directory in but I still need a way to wildcard the directory into the parent.
Example:
R:\Project Folder\800Series\PR8xx\Current\Data\Tooling\ were xx is a wildcard. I will also need to overcome the space in the wordking Project Folder.

The Directory Structure is already in place, I just need to add the single folder to each of the directories.

Any ideas?

6 replies

by ippirate

Outside of the XCOPY command I have been unable to find any other way of performing this.

Just to clarify one last time, I just need to add a single file-subdirectory to an already existing directory structure. The rest of the directory already has data in it that I need to preserve so overwriting is not an option.

Anyone? Anyone?

by _christian_

Because of the space, I suspect that a DOS command will not work here. You would need some character string management and I do not know of any DOS-type command or add-on able to do it. The %% DOS substitution will not handle anything but a very simple insert.

Your best bet is to write a very simple Basic (whichever version) to do so, that should not take many lines.

Sorry if this is not the answer you were hoping for...

by ippirate

Thanks for the input. Manual creation of the file structure has already begun though.

Thanks anyway though.

This discussion is closed to new replies.