[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2006-11-02
2
Medium Priority
?
434 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
vtsinc earned 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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