Is there a way to copy directory structure?

English support forum

Moderators: Stefan2, white, sheep, Hacker

Post Reply
Andante
Junior Member
Junior Member
Posts: 38
Joined: 2018-01-31, 01:38 UTC

Is there a way to copy directory structure?

Post by *Andante » 2018-03-14, 21:59 UTC

I would like to duplicate the directory structure from one branch to another. I don't want to copy any files, just the structure itself. Can TC do this?

User avatar
sqa_wizard
Power Member
Power Member
Posts: 3454
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard » 2018-03-14, 23:03 UTC

Sure, it's a little bit tricky, but easy:

Just select the folders you want to copy and enter at "Only files of this type" a name which does not exist at all (e.g. asdfasdf)

This will copy folders without any file :idea:
#5767 Personal license

Andante
Junior Member
Junior Member
Posts: 38
Joined: 2018-01-31, 01:38 UTC

Post by *Andante » 2018-03-15, 02:14 UTC

Omg, that's FABULOUS!!! I've been using TC for more than two decades, and I never knew that trick before. Thank you so much, Wizard!

What other secret tricks do you know? Would love to learn from you. :-)

palos
New Member
New Member
Posts: 1
Joined: 2019-03-19, 10:02 UTC

Re: Is there a way to copy directory structure?

Post by *palos » 2019-03-19, 10:37 UTC

The (TC) standard way is pretty straigthforward, although it may seem tricky: 1. Select the top level directories to be copied - 2. Click Copy/press F5 - 3. Click on the button having '+' label next to the type selector listbox (bottom) (or select a previously created directory template name from the listbox and continue on step 11) - 4. Enter asterisk (*) into the 'Search for' textbox - 5. Click on/select the Advanced tab - 6. Check 'Attributes' checkbox - 7. Check 'Directories' checkbox - 8. Select 'Save' button - 9. Enter 'DirsOnly' (or any other label at your will) into the template name textbox - 10. Click OK - 11. Click OK ... wait until done, normally pretty soon depending on the direcory tree size.

That's all. Worth to NOTE that the steps 4-10 can be done separately creating a template for directories only, which can be useful in other cases also. In such cases just that template name needs to be selected for the manipulation.



[MTAG]

pipsi
Junior Member
Junior Member
Posts: 2
Joined: 2019-03-19, 20:57 UTC

Re: Is there a way to copy directory structure?

Post by *pipsi » 2019-03-19, 21:02 UTC

Andante:

Select dirs to copy; Hit F5; In "files of this type", write

Code: Select all

|*.*
Hit OK. Done.

hi5
Member
Member
Posts: 172
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Is there a way to copy directory structure?

Post by *hi5 » 2019-03-19, 22:13 UTC

Just type .. in the "file types" (.. = folder 'file type')
F4MiniMenu - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey) - TC Forum thread

User avatar
MVV
Power Member
Power Member
Posts: 8252
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: Is there a way to copy directory structure?

Post by *MVV » 2019-03-20, 05:10 UTC

hi5 wrote:
2019-03-19, 22:13 UTC
(.. = folder 'file type')
No, ".." is not a folder file type, ".." is just a reserved file system, so it causes TC to skip all files (just like as sqa_wizard's way does and which is usually used by me), but folders can't be skipped so only folders are copied.

pipsi
Junior Member
Junior Member
Posts: 2
Joined: 2019-03-19, 20:57 UTC

Re: Is there a way to copy directory structure?

Post by *pipsi » 2019-03-20, 21:32 UTC

Just type .. in the "file types"
Elegant!

Post Reply