PC Review


Reply
Thread Tools Rate Thread

Copy a file hierarchy without files and other refinements

 
 
vizion
Guest
Posts: n/a
 
      29th Mar 2009
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
 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a
 
      29th Mar 2009

"vizion" <(E-Mail Removed)> wrote in message
newsD152294-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.


 
Reply With Quote
 
vizion
Guest
Posts: n/a
 
      29th Mar 2009

--
Photographic Artist


"Pegasus [MVP]" wrote:

>
> "vizion" <(E-Mail Removed)> wrote in message
> newsD152294-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
 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a
 
      29th Mar 2009

"vizion" <(E-Mail Removed)> wrote in message
news:05573139-8CD5-456A-9F13-(E-Mail Removed)...
>
> 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


Use robocopy.exe. It has an /IF (include files) switch. You can get it from
here:
http://www.microsoft.com/downloads/d...displaylang=en


 
Reply With Quote
 
Twayne
Guest
Posts: n/a
 
      29th Mar 2009
vizion wrote:
> 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


An ideal solution if you have time for a short learning curve would be
XXCopy.exe, available from xxcopy.com. Free version is not fully
functional but IIRC has all that you need.

Twayne


 
Reply With Quote
 
vizion
Guest
Posts: n/a
 
      31st Mar 2009

--
Photographic Artist


"Twayne" wrote:

> vizion wrote:
> > 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

>
> An ideal solution if you have time for a short learning curve would be
> XXCopy.exe, available from xxcopy.com. Free version is not fully
> functional but IIRC has all that you need.
>
> Twayne
>
>
>

Thanks everybody -- I seem to have a solution which saves me transfering 1TB
of files backs and forwards every quarter!!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I am looking for a file copy program that will simply copy files without stopping LarryB Windows XP 6 8th Mar 2007 08:24 PM
Should namespace hierarchy reflect the folder hierarchy on the disk HalcyonWild Microsoft C# .NET 5 14th Nov 2005 03:20 PM
Binding DataGrid to an hierarchy of objects - problem with Stylesat the bottom of the hierarchy Terentius Neo Microsoft C# .NET 0 28th Aug 2005 01:35 PM
using File.Copy to copy files to shared hosting site Steve Richter Microsoft ASP .NET 4 18th Apr 2005 04:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:23 AM.