Copying files

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 13,701
    Windows10
       #11

    Pyprohly said:
    Try changing the paths and the -Include argument, preferably to something that exists.


    Whole point of OP's post was he had multiple source directories.
      My Computer


  2. Posts : 93
    Windows 10
       #12

    Multiple source directories and recursive? Okay:

    Code:
    Get-ChildItem 'C:\source1', 'C:\folder\source2', 'C:\some\folder\source3' -Include '*.mp3' -Recurse | Copy-Item -Destination 'C:\destination'
      My Computer


  3. Posts : 13,701
    Windows10
       #13

    Pyprohly said:
    Multiple source directories and recursive? Okay:

    Code:
    Get-ChildItem 'C:\source1', 'C:\folder\source2', 'C:\some\folder\source3' -Include '*.mp3' -Recurse | Copy-Item -Destination 'C:\destination'

    But point is OP would have to type them all in. See my batch file method earlier - takes 5 minutes or less.
      My Computer


  4. Posts : 93
    Windows 10
       #14

    Iím not sure what important fact you are desperately trying to point out to me.

    cereberus said:
    But point is OP would have to type them all in.
    Your method relies on the current directory for the starting path. True, you didnít have to type out this path but this approach does not support multiple starting directories. Aside from this method, the starting paths most typically will have to be typed or how will the interpreter know where to begin looking?

    cereberus said:
    See my batch file method earlier - takes 5 minutes or less.
    I see your batch method is cute and all but I would think that entering a single line of code to get the job done is quite a lot more quicker than opening up a terminal to have a command redirect itís output, then manually opening output file, make edits to it, execute it as a script, etc.

    If this process is faster for you, by all means, speed is relative.
      My Computer


  5. Posts : 13,701
    Windows10
       #15

    Pyprohly said:
    Iím not sure what important fact you are desperately trying to point out to me.


    Your method relies on the current directory for the starting path. True, you didnít have to type out this path but this approach does not support multiple starting directories. Aside from this method, the starting paths most typically will have to be typed or how will the interpreter know where to begin looking?
    No because you always start from the root. The /s parameter just lists every mp3 file in every subdirectory on that drive. The /b just removes header and footer. It handles multiple directories without ever having to type one in at all!
      My Computer


  6. Posts : 93
    Windows 10
       #16

    I know how your method works. If the OP wants the source location to be at the root folder I encourage him to do just that by using my line.

    Code:
    Get-ChildItem 'D:\' -Include '*.mp3' -Recurse | Copy-Item -Destination 'C:\destination'

    cereberus said:
    It handles multiple directories without ever having to type one in at all!
    What you describe as the handling ďmultiple directoriesĒ is the recusing behaviour and this is a given need or it wonít be a valid solution to the problem. My command line recurses, does it not? And technically ďcd \Ē counts as typing a path.

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

    d:

    cd \

    ...
      My Computer


  7. Posts : 13,701
    Windows10
       #17

    Pyprohly said:
    I know how your method works. If the OP wants the source location to be at the root folder I encourage him to do just that by using my line.

    [CODE] My command line recurses, does it not?

    And technically “cd \” counts as typing a path.
    No it does not work - it crashes with all sort of permission errors

    CD\ - rolling of eyes at hair splitting.

    Bye Bye.
      My Computer


  8. Posts : 14
    Windows 10 on Desktop PC
    Thread Starter
       #18

    Copying files


    thanks for the many responses to my original post. My flash drive is recognised by Windows 10 with appropriate icon in system tray but not seen in a command window therefore can't try a batch file. I open the command prompt as administrator and type E: and enter. It says "The system cannot find the file specified" Windows sees it but dos doesn't. Any help would be appreciated.
      My Computer


  9. Posts : 4,176
    Windows 10 Pro x64 Latest RP
       #19

    As this relates to music file, do you use a music manager? If so check if it has any functions to do what you want.
    If not the music manager I use would do what you need without a problem do a search for MediaMonkey I use the Gold Version but the free version should allow you to list all the music files on the USB and you can then select all files right click and select "copy to" and navigate to your required location and all files will be copied for you.

    It's late here now but will see what I can put together in step by step with screen shots in the morning here.

    mediamonky handles my 30000+ track collection so should be OK for however many files you need to move now and in the future, plus a lot more
      My Computers


  10. Posts : 25,093
    10 Home x64 (21H2) (10 Pro on 2nd pc)
       #20

    MIkew365 said:
    My flash drive is recognised by Windows 10 with appropriate icon in system tray but not seen in a command window therefore can't try a batch file. ..., Windows sees it but dos doesn't.
    By 'icon in the system tray' do you mean the eject icon? On its own, that doesn't confirm that Windows has loaded the correct drivers for it. Try uninstalling it in Device Manager then reinsert the flash drive.

    If a flash drive can be seen in File Explorer, it can be seen in a cmd.exe prompt (not Dos, that was for Win95/98). Can you see it in File Manager? If not, how does it appear in Disk Management? Does it have a drive letter assigned?
      My Computers


 

  Related Discussions
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 04:58.
Find Us




Windows 10 Forums