--
Photographic Artist
"Pegasus [MVP]" wrote:
>
> "vizion" <(E-Mail Removed)> wrote in message
> news
D152294-CA52-4DE0-9E9A-(E-Mail Removed)...
> > Hi
> >
> > 1. I have need to duplicate existing file hierarchies maintaining copies
> > of
> > the existing directory tree but without any of the files contained within
> > the
> > hierarchy.
> >
> > 2. Refining the problem. I also have the need to duplicate existing
> > heirarchies as above however if there are directories with a specific name
> > anywhere within the tree I want to copy the files that are contained in
> > all
> > directories having that name.
> >
> > Simple Example:
> > Here is an existing tree for an image archive where existing images are
> > stored in their numeric order in a sub-directory created as images have
> > been
> > downloaded into the archive. Each sub-directory is named according to the
> > range of image numbers it holds. These image directories may have a sub
> > directory called 'Selected' holding processed images.
> >
> > The Image directories are, in their turn, sub directories within a month.
> > The months are subdirectories within a year.
> >
> > I now want to create duplicate file hierarchy in which the image
> > directories
> > are preserved but have no files but do have the 'Selected' directories and
> > their contents.
> >
> >
> > Dir_2008
> > Dir_01_Jan
> > Dir_12345_12377
> > file 12345
> > file 12346
> > file 12347
> > Dir_Selected
> > file 12346_processed
> >
> > Dir_12377_12402
> > files
> > Selected
> > files
> > 12403_12499
> > files
> > Selected
> > 12500_12600
> > 02_Feb
> > etc etc
> >
> > I am current doing this every quarter on a Unix system but it means
> > transferring the hierarchy to a samba directory on a unix server,
> > processing
> > it on the unix system and then shifting the results back to the XP x64 bit
> > system which is used for image processing.
> >
> > Does anyone have any idea how such selective copying could be achieved on
> > XP
> > x64
> >
> > Thanks
> >
> > Photographic Artist
>
> Start a Command Prompt and type xcopy.exe /?. You will see a switch that
> lets you copy folders only, without any files.
>
>
>
Aha -- Thank you that solves the hierarchy problem very nicely.
I note there is a very useful EXCLUDE command but not not an include that
would have the effect of modifying the hierarchy command to instruct it to
include any files in a named directory.
On a unix machine I first copy the file structure and them generate an extra
list of file paths. I then use grep to find all the paths that include the
word 'Selected' and pipe the resultant list to a copy command to dump all the
files that are in 'Selected' directories into the appropriate directory in
the new hierarchy. It takes two lines in a shell. Is there a way of doing
something similar with XP x64?
Thanks for getting me started.
david