Page 1 of 3 123 LastLast
  1.    30 Apr 2017 #1
    Join Date : Apr 2017
    Posts : 4
    Windows 10 on Desktop PC

    Copying files


    I have a flash drive with many mp3's on it, however they are split up into various folders. How can I copy all mp3's to my fixed disc without the directories, ie just copy the mp3's without having to access each individual directory. TIA, Mike
      My ComputerSystem Spec
  2.    30 Apr 2017 #2
    Join Date : Feb 2015
    Bamberg Germany
    Posts : 17,578
    Win10 Pro, Win10 Pro N, Win10 Home, Win10 Pro Insider Fast Ring, Windows 8.1 Pro, Ubuntu

    Use the wild card option, an example:

    copy C:\UserName\music\*.* D:\backup

    3 Ways to Copy Files in Command Prompt - wikiHow
      My ComputersSystem Spec
  3.    30 Apr 2017 #3
    Join Date : Oct 2013
    Newport, South Wales, UK
    Posts : 1,810
    Windows 10 Pro x64 FCU - XP/Vista/Win7/Win8.1 in VM for testing

    I think you may be better using this slightly modified command if you do not need to move the folders *.mp3 will only copy the MP3 files Whereas *.* will also copy the folders
    Code:
    copy C:\UserName\music\*.mp3 D:\backup
      My ComputerSystem Spec
  4.    30 Apr 2017 #4
    Join Date : Dec 2015
    Posts : 5,906
    Windows10

    Quote Originally Posted by Barman58 View Post
    I think you may be better using this slightly modified command if you do not need to move the folders *.mp3 will only copy the MP3 files Whereas *.* will also copy the folders
    Code:
    copy C:\UserName\music\*.mp3 D:\backup
    This is not what OP is asking - OP has mp3 files in many directories and wants to put them all in one directory.
      My ComputerSystem Spec
  5.    30 Apr 2017 #5
    Join Date : Oct 2013
    Newport, South Wales, UK
    Posts : 1,810
    Windows 10 Pro x64 FCU - XP/Vista/Win7/Win8.1 in VM for testing

    If this does not work you may need to use robocopy ...

    file - ROBOCOPY - Copy folders content to a single folder - Stack Overflow
      My ComputerSystem Spec
  6.    30 Apr 2017 #6
    Join Date : Dec 2015
    Posts : 5,906
    Windows10

    The way I would do it is open a command prompt and type (say usb was d drive)

    d:

    cd \

    dir /s /b *.mp3 > mp3.bat

    Then open mp3.bat in notepad and

    1) replace all "d:" with "copy d:"

    2) replace all ".mp3" with ".mp3 d:\mp3files\*.* (can change drive and path of destination - folder must exist)

    3) save and run batch file

    Just tested above (with pdf files in my case and it worked perfectly.
      My ComputerSystem Spec
  7.    30 Apr 2017 #7
    Join Date : Feb 2015
    Bamberg Germany
    Posts : 17,578
    Win10 Pro, Win10 Pro N, Win10 Home, Win10 Pro Insider Fast Ring, Windows 8.1 Pro, Ubuntu

    Quote Originally Posted by cereberus View Post
    The way I would do it is open a command prompt and type (say usb was d drive)

    d:

    cd \

    dir /s /b *.mp3 > mp3.bat

    Then open mp3.bat in notepad and

    1) replace all "d:" with "copy d:"

    2) replace all ".mp3" with ".mp3 d:\mp3files\*.* (can change drive and path of destination - folder must exist)

    3) save and run batch file

    Just tested above (with pdf files in my case and it worked perfectly.
    Easiest is just to copy the path in file explorer and paste it in.
      My ComputersSystem Spec
  8.    30 Apr 2017 #8
    Join Date : Mar 2015
    Sydney, NSW
    Posts : 93
    Windows 10

    Quote Originally Posted by Barman58 View Post
    If this does not work you may need to use robocopy
    There’s no switch to stop robocopy from preserving the directory structure. The way to do this in batch is to loop off the results of dir, which can be done directly like so.
    Code:
    for /f "delims=" %%I in (' dir /a:-d /b /s "C:\source\*.mp3" ') do (
        copy "%%~I" "C:\destination\%%~nxI"
    )

    But allow me to advocate for the PowerShell way:
    Code:
    Get-ChildItem 'C:\source' -Include '*.mp3' -Recurse | Copy-Item -Destination 'C:\destination'
      My ComputerSystem Spec
  9.    30 Apr 2017 #9
    Join Date : Dec 2015
    Posts : 5,906
    Windows10

    Quote Originally Posted by Pyprohly View Post
    But allow me to advocate for the PowerShell way:
    Code:
    Get-ChildItem 'C:\source' -Include '*.mp3' -Recurse | Copy-Item -Destination 'C:\destination'
    Just tried it - failed with all sorts of error messages about permissions when using C drive.
      My ComputerSystem Spec
  10.    30 Apr 2017 #10
    Join Date : Mar 2015
    Sydney, NSW
    Posts : 93
    Windows 10

    Try changing the paths and the -Include argument, preferably to something that exists.
      My ComputerSystem Spec

 
Page 1 of 3 123 LastLast


Similar Threads
Thread Forum
Solved Help with copying files to CD
I cannot figure out how to burn some files to a CD. I put a blank in the drive and try to copy files to the CD by opening a window of the source and the drive as the target. I click and drag the files from the source to the target window and I get...
General Support
Homegroup - copying files
I want to copy files from the source PC to the destination PC, but I don't want to allow editing or deletion of these files from the destination PC. How do I set this up? Thanks! Tried setting the destination folder as Homegroup > View, but then...
Network and Sharing
copying damaged files from CD/DVD?
Is there a rugged copy program that can copy a partially corrupted file (*.mpg) from a CD/DVD onto your H/D? What happens is that when the normal windows copy operation encounters that portion of the DVD that is faulty, it tries over and over again...
Software and Apps
How is copying files in Windows 10?
In Windows 7, it can be a real bother to leave a folder to copy to another drive, with some files in the folder being new versions to replace versions already existing in a same-name folder on the drive that's being copied to... and at some point...
General Support
Copying new files stuck at 83%
Hey everyone. I got my free upgrade to Windows 10 and I tried installing it. But it got stuck at 24%, copying new files 83%. If anyone could help me I'd appreciate it. Thank you
Installation and Upgrade
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:31.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums