Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.

You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.

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 ) 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 directoryThis powerful command copies an entire directory structure into anotherplace, minus its contents. All the subfolders of the original directory arecopied recursively, but files in them are not copied.The original directory is not affected by this command at all. To copystructure, follow these three steps:

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

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

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 someserious problems. With Windows Explorer, you can follow two differentoptional methods to copy structure; and both have problems, as we will see:

> Copy the entire top-level folder to a new place (along with itssubfolders and their contents). Now find all files in this directory bylaunching a search with *.* as your search condition. Explorer willlist all files in the directory. Select all of them and delete. This willleave an empty folder structure that is identical to the original foldersystem.

The disadvantage in this method is that you need a huge free diskspace at the destination drive, because the entire contents of theoriginal directory have to be accommodated there before you startdeleting them.

> Creating each subfolder manually. This is an extremely laboriousmethod if you have to create large directory structures. You maymake numerous mistakes, which requires enormous correction effort.Besides, if you donât realize your mistake, you will actually create adifferent subfolder!

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

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:

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..? 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".

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

@MilesAhead: That Code Project bit was spot-on. I was just wondering how to put that code into an AHK script (I am a beginner in AHK) when your post with the script popped up. Thanks! Nice work and smart thinking, Batman - if you don't mind my saying so! (...and at the risk of further inflating your possibly already over-inflated ego).

I changed the program so that it doesn't use the script path as the working directory and added a command line param. The "working directory" is now the current directory of the command prompt, or the Start In value if run from a shortcut. For relative paths if you typeCreateDir test\testand the command prompt is in c:\tempthe result should bec:\temp\test\test

it still pops up an InputBox with the command line already entered so that you can confirm that's the folder you want to create, or cancel.

runs all the time, copy a folder (CTRL+C) and use the hotkey (F11) to duplicate the folder and it's associated path in the folder of your choice (you get a prompt to select the target dir when you use the hotkey

also works with files (the file name is stripped out of the path), and with multiple folder selections, ie selecting

I've been using this nifty free tool from RJLSoftware to do exactly what you're asking. It's called "TreeCopy" From the authors site:

Have you ever needed to copy a directory structure without copying the files? TreeCopy now makes this possible. Our small program will allow you to select the "from directory" and "into directory", and it will proceed to copy ONLY the directory structure. The utility is bundled with functionality such as a command line interface, calculate directories, Windows XP look and feel and much, much more!TreeCopy is a free download, so try it out.

oops, sorry, I see you've already found this one. Guess I should read the whole thread before posting..

If you want to do this for backup or sync purposes, you might want to consider Beyond Compare. It's an excellent sync utility and it will automatically create the path for you.

On the left side, you would select the location to copy from, let's say "C:\Documents and Settings\All Users\Documents\My Pictures\"On the right side you would select (in your example) D:\tempThen you would copy "\Documents and Settings\All Users\Documents\My Pictures\" from the left side to the right side to get this: "D:\temp\Documents and Settings\All Users\Documents\My Pictures\"Then sync the folders. Beyond Compare gives you the option of automatically creating the directory structure.