ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Create folder structure or path

(1/4) > >>

IrmaIsfot:
I would like to be able to create a 'copy' of a path. 

For example, let's say I have a file in this folder:
C:\Documents and Settings\All Users\Documents\My Pictures\

I would like to copy this file to D:\temp so that the path becomes like this:
D:\temp\Documents and Settings\All Users\Documents\My Pictures\

Now, I would have to go to D:\temp, create the first folder Documents and Settings, then enter that folder to create the next All Users folder, and so on, before I can copy my file to that location.

If possible, I'd like a right click option in Windows Explorer to select 'Copy with path' and then 'Paste and create path'.

I hope I have managed to explain myself?

Thanks!

/Håkan, Sweden

IainB:
It might help if I describe what I would do and/or actually do.
To do what you are suggesting - i.e., Create folder structure or path - I think I would first use xplorer2 (a brilliant product  :Thmbsup: ) to create a duplicate copy of just the directory structure. I have not needed to do this myself, but page 183 of the xplorer2 User Manual (Version 1.7.2.0-1) describes a 3-step approach to doing this:

Copying only the structure of a directory
This powerful command copies an entire directory structure into another
place, minus its contents. All the subfolders of the original directory are
copied recursively, but files in them are not copied.
The original directory is not affected by this command at all. To copy
structure, follow these three steps:

1. Select the top-level folder and press CTRL+C (or select the Edit |
Copy menu option)

2. Go to your destination folder (the folder where you want to place the
copied structure).

3. R-click and from the context menu that pops up, select the Paste
special | Folder structure menu option. (Instead of the context menu,
you can also use the Edit |Paste special | Folder structure menu
option.)


Once I had the duplicate structure set up, I would use the sync and mirror copy functions in xplorer2 to copy files individually or in blocks, from the original structure to the duplicate structure. I sometimes use this approach when manually updating/checking some of my duplicate files/directories on different devices- e.g., backup drives, or USB memory sticks that I use for portable applications.

The manual goes on to describe some circumstances under which you might find duplicating a directory structure useful:
It also describes the two ways to do it in Windows Explorer (one of which you described), and describes the corresponding disadvantages:

We never did this before because doing it with Windows Explorer had some
serious problems. With Windows Explorer, you can follow two different
optional methods to copy structure; and both have problems, as we will see:

> Copy the entire top-level folder to a new place (along with its
subfolders and their contents). Now find all files in this directory by
launching a search with *.* as your search condition. Explorer will
list all files in the directory. Select all of them and delete. This will
leave an empty folder structure that is identical to the original folder
system.

The disadvantage in this method is that you need a huge free disk
space at the destination drive, because the entire contents of the
original directory have to be accommodated there before you start
deleting them.

> Creating each subfolder manually. This is an extremely laborious
method if you have to create large directory structures. You may
make numerous mistakes, which requires enormous correction effort.
Besides, if you don’t realize your mistake, you will actually create a
different subfolder!

You can get a free Lite version, or buy a trial Pro version of xprorer2 from here: http://zabkat.com/

Hope this helps or is of use.  :)

IrmaIsfot:
Thanks for the suggestion!

This, however, is not what I want to achieve.  I found this free sw to do what I think you suggest to do with xplorer2: TreeCopy

But both of these two programs will create a whole tree of branches, when I only want one single branch!

If I want the branch \Documents and Settings\All Users\Documents\My Pictures\ (like in my first post) I would have to copy the 'Documents and Settings' level.  That would give me a copy that looks something like this:

D:
 | temp
     | Documents and Settings
         |  Administrator
              |  Everything below here
         |  All Users
              |  Application Data             
                  |  Everything below here
              |  Desktop
                  |  Everything below here
              |  Documents
                  |  My Pictures
              |  Favorites
                  |  Everything below here
              |  Start Menu
                  |  Everything below here
         |  Default User
              |  Everything below here
         |  User1
              |  Everything below here
         |  User2
              |  Everything below here

When all I really want is this:
D:
 | temp
     | Documents and Settings
         |  All Users
              |  Documents
                  |  My Pictures


Sure, I could use this method to create the complete empty structure, then copy my file to the desired destination, and finally use the convenient little DelEmpty-app by Skrommel.  But that's kind of an uggly solution...

So, suggestions please..?  :huh:  Is there maybe an easy way to do this already?

Otherwise, I'm thinking a program that adds options to the context menu in Windows Explorer.  When right-clicking a folder, the context menu would offer "Copy folder path" (implies from root to here), and when right clicking another folder, the menu would offer "Paste folder path" if one is present in the clipboard. 
If you do not want the complete path from the root, you could manually copy just a selection of it from the Address-bar, which places it in the clipboard, and thus makes it possible to paste with "Paste folder path".

Now, that'd be great!  :D

/Håkan

MilesAhead:
Does this look like what you mean?
http://www.codeproject.com/KB/files/Folder_Utility.aspx

MilesAhead:
AHK has a function to make the folder chain, so that part is easy.

This script provides an input box.  If you type (or paste)an absolute path such as c:\temp\temp\mytemp it will create the folder if it doesn't exist. If you type a path say test\test\mytest   it will start the chain in the working directory(where the script is located.) At the end it opens the folder so you can at least drag & drop the file(s) into it.  Guess I'm a bit lazy :)


--- ---;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         MilesAhead
;
; Script Function:
; Creates new folder chain and opens terminal folder
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#NoTrayIcon
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
InputBox,DirName,CreateDir,Enter New Folder to Create
If ErrorLevel
Exit
IfNotExist,%DirName%
FileCreateDir,%DirName%
run explorer %DirName%

Navigation

[0] Message Index

[#] Next page

Go to full version