Page 1 of 1

Copy Directory Structure

Posted: 23 Oct 2006 11:45
by lukescammell
Several times a month I come across the need to copy the directory structure of a project for a new one, however I don't want any of the old files. It would be great to be able to copy a directory and then paste only the folders, without any of the files, to a new location.

Posted: 23 Oct 2006 12:22
by RalphM
There are two ways in XY to accomplish this:

1. If the structure is changing every now and then, right-drag the top folder of the structure to the new location and select "Create branches here" from the ctx menu, which does exactly what you asked for.

2. If the structure is always the same, you create that structure once in XY's application subfolder NewItems (i.e. C:\Programme\XYplorer\NewItems\) by using method 1. or manually.
Then, whenever you need to create that structure, just select it from the Edit/NewItems menu and it's created in the current location.
This option even allows you to store certain files within that structure template, that are created with the structure every time as well.

Posted: 23 Oct 2006 14:02
by lukescammell
Bonus!

Very glad it's already here. Just takes time to actually find half the stuff you can do with XY, I'm never sure whether to post a wish or a request for a tip...

Out of interest, what is the difference between the "Branches" and "Folders" option? It seems to do the same thing for me.

Posted: 23 Oct 2006 14:27
by admin
lukescammell wrote:Bonus!

Very glad it's already here. Just takes time to actually find half the stuff you can do with XY, I'm never sure whether to post a wish or a request for a tip...

Out of interest, what is the difference between the "Branches" and "Folders" option? It seems to do the same thing for me.
Branches = Folders with all their subfolders (recursing the whole branch)
Folders= Folders without any subfolders, just the folders

Posted: 23 Oct 2006 15:41
by lukescammell
Thanks for that :)

Posted: 24 Oct 2006 13:44
by zridling
Yes, that clears up the distinction for me, too. I had conflated the two (branches and folders).

Posted: 24 Oct 2006 15:45
by admin
zridling wrote:Yes, that clears up the distinction for me, too. I had conflated the two (branches and folders).
While "branch" fits nicely into the tree metaphor, "folder" does not. Technically it's called a "node" which neither is part of a sane tree, I think.

Thanks for reading a fruitless (ah, tree metaphor!) posting! :wink:

Re: Copy Directory Structure

Posted: 07 Nov 2023 19:32
by Clippy
I'm trying to accomplish the same thing as the OP. I've tried both methods of using the "Create branches here" as well as the 'NewItems' method. While both create the directory structure correctly, neither seems to keep the saved folder view that the original has. In my case the top level folder has 3 subfolders that should be displayed with a "Details" view, and then when selecting any of the subfolders the view should be "Thumbnails #3".

Is there a way to keep the folder view settings intact as well? A bonus would be if it also recreated the sort criteria for each of the original folders.

Re: Copy Directory Structure

Posted: 07 Nov 2023 19:53
by highend
Try to use folder view settings (ofc with relative paths). Anything else won't work

Re: Copy Directory Structure

Posted: 07 Nov 2023 19:58
by Clippy
highend wrote: 07 Nov 2023 19:53 Try to use folder view settings (ofc with relative paths). Anything else won't work
I did save the folder view settings for each of the folders in the 'template' folder before using either the 'Create Branches Here' or the 'NewItems' methods but that doesn't work. Or are you talking about something else?

Re: Copy Directory Structure

Posted: 07 Nov 2023 20:02
by highend
Show a screenshot of that definition and the folder structure as well?

Re: Copy Directory Structure

Posted: 08 Nov 2023 23:06
by Clippy
highend wrote: 07 Nov 2023 20:02 Show a screenshot of that definition and the folder structure as well?
Thanks for the help!

I'm not sure what the "definition" is but maybe it's this?
1.jpg
2.jpg
So I created the "Template" folder in C:\Users\Dave\AppData\Roaming\XYplorer\NewItems\

I then saved the folder view for the "Template" with the view as "Details". then for the three subfolders, "Top Camera", "Back Camera" and "Microscope" I went into each and changed the view to "Thumbnails #3" and saved the view for each folder.

Then I tried both right click and dragging the 'Template' folder to a new drive and selected "Create Branches Here". When I do that all of the subfolders (Top Camera, etc) all have a view of "Details", not "Thumbnails #3". The same happens if I use the right click "New Items" and select the "Template Folder".

Re: Copy Directory Structure

Posted: 09 Nov 2023 00:23
by highend
Ofc this doesn't work, you've used fixed paths for those folder view definitions. As I already said, they must use relative paths

E.g.:
*\Microscope, *\Top Camera, etc. so that they are applied to all those copied directory structures...

Re: Copy Directory Structure

Posted: 09 Nov 2023 00:55
by Clippy
Thanks, that sorted it.

Re: Copy Directory Structure

Posted: 09 Nov 2023 17:52
by yuyu
lukescammell wrote: 23 Oct 2006 11:45 copy the directory structure of a project
Paste Special > Paste Folder Structure