1

I have a playlist of MP3s that live on a Synology NAS in my home. There is a playlist of about ~500 songs I wish to download to my local PC. I have a list of all of these files and their locations in the following format:

/volume1/Synology Media/Music/The Lumineers/The Lumineers/Ho Hey.mp3

/volume1/Synology Media/Music/Edward Sharpe and The Magnetic Zeros/Chrysalis Music Group USA – Coachella 2010 Sampler/Home (RAC Remix).mp3

/volume1/Synology Media/Music/Bliss N Eso/Circus In The Sky/Home Is Where The Heart Is.mp3

/volume1/Synology Media/Music/Avicii Vs. Nicky Romero/I Could Be The One [Single]/I Could Be The One (Didrick Remix).mp3

Is there something within Powershell or CMD that I could run in order to pull these files from my NAS to my PC? I've seen references to curl and Postman in other posts.

I don't necessarily need the folder structure, just the files. I can reestablish the folders with MP3Tag once I have them locally.


UPDATE 1: Pursuing the suggestion from below, I looked into Copy-Item which seems to be capable of the operation I am looking to complete. I have tried a few variations of the following

Copy-Item -Path \\Z:\volume1\Synology Media\Music\The Lumineers\The Lumineers\Ho Hey.mp3

and

``Copy-Item -Path \192.168.1.14\volume1\Synology Media\Music\The Lumineers\The Lumineers\Ho Hey.mp3`

The IP address being the location of my Synology server on my local network.

I get an error that states:

Copy-Item A positional parameter cannot be found that accepts argument 'Media\Music\The'. Atline:1 char:1

Is this indicating that my address for the file is inaccurate? Or is the issue something else?


SOLVED:

I needed to enclose my path in quotes as there were spaces in the folder names. Also needed to adjust my file path to my server. As I have 850 different mp3 files to move, I will separate my entries with a comma.

From my example above, it will look like this:

Copy-Item -Path "\\192.168.1.14\Synology Media\Music\The Lumineers\The Lumineers\Ho Hey.mp3","\\192.168.1.14\Synology Media\Music\Edward Sharpe and The Magnetic Zeros\Chrysalis Music Group USA – Coachella 2010 Sampler\Home (RAC Remix).mp3","\\192.168.1.14\Synology Media\Music\Bliss N Eso\Circus In The Sky\Home Is Where The Heart Is.mp3" -Destination "C:\path\goes\here"

Jeff A
  • 33
  • 5
  • Take a look at `Get-ChildItem`, along with `Copy-Item`. – Abraham Zinala Feb 24 '22 at 15:11
  • I believe you're right that `Copy-Item` will be capable of what I am looking to do. I returned an error when trying a few variations of the method and have updated my OP if you are still following. – Jeff A Feb 24 '22 at 17:57
  • You have to quote paths with spaces in the name: `"\\serverIP\something path"`. You also should be using the FQDN rather than the relative path, so using the UNC path should begin with 2 *forward* slashes, not just one: `Copy-Item -Path "\\192.168.1.14\volume1\Synology Media\Music\The Lumineers\The Lumineers\Ho Hey.mp3" -Destination "C:\path\goes\here"` – Abraham Zinala Feb 24 '22 at 18:01
  • 1
    Bingo. Added quotes, but also needed to amend my address, and we are in business. I have been able to add multiple files separated by a comma, and that's just about everything I was looking to do. Perfect. Thank you so much. – Jeff A Feb 24 '22 at 18:15
  • Feel free to post again if you run into issues, just include your code attempt next time or the community will be reluctant to help you with the problem. Also, `Copy-Item` supports a `-Filter` and `-Recurse` parameter to search for specific file types, and copy them recursively if they live within sub-folders while keeping the folder structure. If you don't care about the folder structure, `Get-ChildItem` supports the same parameters and when piping to `Copy-Item` the folder structure won't be copied. So: `Copy-Item -Path "\\ServerIP\Path" -Destination "C:\Local\Path" -Filter "*.mp3" -Recurse` – Abraham Zinala Feb 24 '22 at 18:21
  • The above will copy all `*.mp3` files recursively so no need to specify each one manually. Glad you got it figured out tho:) – Abraham Zinala Feb 24 '22 at 18:24
  • 1
    Will do. I figured there was an ability to do this, but it wasn't until you said `Copy-Item` that I knew what to look for and the proper terminology to verbalize and Google for. A few blog posts guided me on the general structure, but the quotes around everything (and fixing my file path) were the last bit of help I needed. – Jeff A Feb 24 '22 at 18:25
  • I don't want to copy all mp3 files in the directory. Just the ~850 that I have from a playlist m3u file. I'll organize them with MP3Tag and then add to my MP3 player. And then from there, I can upload the m3u file to the device which will build that same playlist on the mp3 player. So to be that specific with my files, unless I'm wrong, I think I do need to manually enter each file, right? – Jeff A Feb 24 '22 at 18:27
  • If all the ones you need to copy are in your M3U file, you can almost certainly parse it using `Get-Content` with a bit of *RegEx* and the rest would be some PowerShell logic to copy it. You can definitely make another post and go from there, as long as a sample of your m3u file is included with what you're looking to do. – Abraham Zinala Feb 24 '22 at 18:52

0 Answers0