Solved

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

Posted on 2006-11-02
2
421 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
ID: 17860586
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
ID: 17861113
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Cannot access port 443 4 575
Application Deployment - Simple 7 640
VBScript not processed at Windows 8.1 logon 2 7,954
Slow access to network shares - Win 2000 accessing Win 8 Share 5 125
What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 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

14 Experts available now in Live!

Get 1:1 Help Now