Solved

Is it possible to merge multiple directories into a single directory?

Posted on 2006-11-02
2
417 Views
Last Modified: 2008-01-09
I have a directory with 100 subfolders. I want to merge the files from all the subfolders into a single folder.  Is this easily accomplished in Windows?

Kind Regards and thanks in advance for any help.
0
Comment
Question by:FocusedEnergy
2 Comments
 
LVL 6

Accepted Solution

by:
vtsinc earned 500 total points
Comment Utility
I'm not aware of a built-in way to do it but you could try the XXCOPY utility available at www.xxcopy.com.  It allows you do do a copy operation and f"flatten" the subdirectories into a single directory using the /SX switch.  Here's output from the command-line help:

XXCOPY  == Freeware ==    Ver 2.93.1  (c)1995-2006 Pixelab, Inc.

XXCOPY src [ dst ] [ options... ]
        src  specifies the source file(s) or directory to copy
        dst  specifies the destination directory (no file names)

  Option switches start with a slash (/) immediately followed by letter(s).
  XXCOPY supports most XCOPY switches (/A/M/P/S/E/T/W/C/I/F/L/H/R/U/K/Y/N).
         /S  Copies subdirectories       /K  Keeps file attibutes as in src
         /H  Copies hidden files also    /U  Updates files that exist in dst

     /CLONE  Duplicates a directory (or entire volume) as incremental backup.
    /BACKUP  Backs up the directory without deleting extra files.
        /SG  Gathers files from subdirectories into one directory.
        /SX  Flattens subdirectories into a one-level directory.
   /SZ:-<n>  Copies files whose size is <n> bytes or less.
         /Z  Deletes extra files/dirs in the destination (/ZY, without prompt).
  /DA:<date> (/DB:<date>)  Copies files made on/after (before) the date.
  /X<fspec>  Excludes file(s) which match <fspec> pattern (wildcard OK).
         /Y  No prompt on file overwrite  (/YY  Suppreses nearly all prompts).
      /HELP  Displays a full help text, (/HELPA in alphabetical order).
         /?  Displays a focused help text with the switch(es) you specify.
  Over 160 switches in all (visit http://www.xxcopy.com for details).

C:\Documents and Settings\mdurkin.VTS-INC>
0
 

Author Comment

by:FocusedEnergy
Comment Utility
Thanks so much! This definitely answers my question though I didn't end up using it.  A colleague suggested that I zip the directory and not maintain the tree structure, one unzip later and I was home free!

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

12 Experts available now in Live!

Get 1:1 Help Now