1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Copy all files from folders and subfolders, without folders being copied

Discussion in 'Software' started by shadowwebs, Apr 17, 2013.

  1. shadowwebs

    shadowwebs Megabyte Poster Forum Leader

    841
    10
    76
    So, a user has given me a usb stick full of files in hundreds of folders, they want the files all copied in to a new folder titled 'upload', and for this to only copy the files and not the folders or subfolders... can xcopy do this, or will this copy the folders also.

    otherwise, does anyone know of a free gui utility out there that would do it?
     
    Certifications: compTIA A+, Apple Certified Technical Coordinator 10.10 (OS X Yosemite, Server and Support)
  2. kevicho

    kevicho Gigabyte Poster

    1,219
    58
    116
    In windows 7 go to the root directory and do a search for *.*, that should list all the files included in the subfolders, the search is usually in the top right of explorer.
    From the list that is created click the top file (folders may be first), scroll right to the bottom of the list, hold down shift and click on the last file, all the files should then be highlighted, hold down control and press C, this will copy the files.
    Navigate to your "upload" folder, press control and V, this should paste them all in.

    Windows XP you may need to use the search on the start menu.

    Hope this helps.
     
    Certifications: A+, Net+, MCSA Server 2003, 2008, Windows XP & 7 , ITIL V3 Foundation
    WIP: CCNA Renewal
  3. parman05

    parman05 Byte Poster

    126
    0
    21
    You should use robocopy I think its the /s switch but it could be /r. I would look.
     
    Certifications: A+, Network +, MCTS WIN7 (70-680), MCITP WIN7 (70-685), MCSA WIN7, Linux +,LPIC-1, Novell CLA 11, SUSE 11 Tech Spec, DC Tech Spec
    WIP: 70-640, 70-642, security +, CCNA
  4. Gav

    Gav Kilobyte Poster

    447
    14
    27
    You could use PowerShell for this:

    Code:
    foreach($File in (Get-ChildItem E:\ -Recurse | where {! $_.PsIsContainer})) {
    	Copy-Item $File.FullName ("C:\Upload\" + $File.Name)
    	}
    
    The above assumes your flash drive is E:\ and you want to copy to C:\Upload\. It also can't handle files with the same name, and will throw an error if this happens...

    - Gav
     
    Sparky likes this.
  5. dales

    dales Gigabyte Poster

    1,998
    46
    97
    This wouldn't be "Artistic" photography would it by any chance :P
     
    Certifications: vExpert 2014+2015+2016,VCP-DT,CCE-V, CCE-AD, CCP-AD, CCEE, CCAA XenApp, CCA Netscaler, XenApp 6.5, XenDesktop 5 & Xenserver 6,VCP3+5,VTSP,MCSA MCDST MCP A+ ITIL F
    WIP: Nothing
  6. Sparky
    Highly Decorated Member Award

    Sparky Zettabyte Poster Moderator

    10,191
    299
    319
    Was thinking the same thing! :)
     
    Certifications: MSc MCSE MCSA:M MCSA:S MCITP:EA MCTS(x5) Security+ Network+ A+
    WIP: Exchange 2007\2010
  7. shadowwebs

    shadowwebs Megabyte Poster Forum Leader

    841
    10
    76
    haha nope not artistic photography, just thousands of reports in lots of folders... I have managed to copy them all over now, thanks for your tips.
     
    Certifications: compTIA A+, Apple Certified Technical Coordinator 10.10 (OS X Yosemite, Server and Support)
  8. SimonV

    SimonV Petabyte Poster Administrator

    6,616
    149
    228
    Share what you did, somebody else may find the thread and what you did may help them. :)
     
    Certifications: MOS Master 2003, CompTIA A+, MCSA:M, MCSE
    WIP: Keeping CF Alive...
  9. shadowwebs

    shadowwebs Megabyte Poster Forum Leader

    841
    10
    76
    I went for the search by "." and then just copied and pasted the results in to a new folder... on speaking to a friend of mine that enjoys coding in VB, he is going to knock together an application for doing these sort of things I believe.
     
    Certifications: compTIA A+, Apple Certified Technical Coordinator 10.10 (OS X Yosemite, Server and Support)

Share This Page

Loading...