Copy (Reproduce) Directory Structure Only - No Files

Posted on 2004-11-12
Last Modified: 2008-03-17
We have a desire to copy the directory structure *only* for a given directory, but none of the files.  The method needs to be scriptable (DOS command, VBscript, executable?) - No GUI tricks.

In other words, I have a directory that contains other directories and files.  I want to duplicate the directory structure/hierarchy of that folder in another location without bringing the files along with.

What is the easiest way to do this?  Is there a way to do it in Windows (2000) without third party addons?  VBscript?  Examples?

A batch file or VBscript would be preferred, although a small third-party executable would be okay.
Question by:hendridm
    LVL 95

    Accepted Solution

    XCOPY will do the trick.

    XCOPY /T /E Source Destination

    for more details on XCOPY, type XCOPY /? at a command prompt.
    LVL 8

    Author Comment

    Did the trick.  Not sure why I didn't notice that before :P  Thanks!

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Occasionally Windows/Microsoft Updates will fail to update. We have found a code that will delete all temporary files and re-register all dll's related to Windows/Microsoft Updates! This works 99% of the time to get the updates working again! The…
    Hello I read in a discussion about a person who configured a very simple mirror RAID with two hard drives; the system and data were on the same partition. He asked how to repair the system as it was not booting up anymore. In his case running …
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now