• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

A technique for wirelessly transferring music library from Windows to iPhone

shuppatsu

Active Member
Joined
Apr 27, 2023
Messages
155
Likes
265
For years I've used iTunes to transfer a subset of the music library stored on my Windows PC to my iPhone. I would create a playlist containing all the music I wanted on my phone, plug my phone in, select the box in iTunes to transcode lossless files to 128kbps AAC, and then sync the playlist to my phone. I'd then use the Apple Music app to listen to music while on the go.

This worked brilliantly until it didn't. The latest (and last--development ceased years ago) version of iTunes mandates a backup for every sync, making the process unbearably slow. Attempts to use older versions of iTunes resulted in myriad problems. I spent a long time trying to find ways to get this to work. I'm a fair hand at computers, but I finally gave up.

So if not iTunes, what? Google isn't very helpful. Most "articles" I found are poorly written content mill pieces and appear to be for people who want to upload a file or two and don't mind playing tracks individually from a cloud app like Dropbox. I could not find any good Foobar or MusicBee solutions (MusicBee had a plugin but it relies on iTunes, natch). Apple's "walled garden" approach to iOS security makes things difficult. I saw some commercial tools available, but I wasn't about to spend money on something without having an idea whether it would actually work.

I finally figured out one way, and I will list the steps below for anyone else in the same predicament. If you know any other ways, or ways to improve the steps below, I'd appreciate any replies.

Edits are in red and removed text is crossed out.

1. Download the Foobar2K iOS app. Unfortunately this only works for Foobar2k, an app with a clunky UI that to my knowledge is not being actively worked on. On the plus side, it's fairly powerful and flexible, and we take advantage of its power here.

2. Prepare a shadow directory of all music library files to add to phone.

a. Create a playlist containing all songs to add to phone.
I did this with the Windows Foobar2k application, but I imagine it can be done with MusicBee and other "power user"-style music programs. I have a column that lists all albums in my library. I created a hotkey action within Foobar2k that sends selected items to a playlist. Unfortunately, the default is to create a new playlist and if you want to add the selections to a current playlist you have to type it in. Rather than try to figure out Foobar's scripting language, I made a simple macro script using a program called AutoHotkey that invoked the "send to playlist" command, paused for a few ms, then typed in the playlist name and pressed "Enter." Then I could select all the albums I wanted using CTRL-click, then hit the hotkey to move the tracks to my phone playlist.

b. Convert lossless tracks and copy lossy tracks to a shadow directory. Once the playlist was made, I used the "Convert" context menu to convert all lossless files to 128kbps Opus and place them in a "Phone Library" directory. For "Destination," I used "%artist%\%album%\%filename%" "%album artist%/%album%/[%discnumber%.]%tracknumber%. $if($meta(album artist),%artist% - ,)%title%", which recreates my folder structure. In the "Convert" window, under "Other", under "Copy other files to the destination folder," type in "*.jpg" or whatever filetype you use for album art. Then I used the "File Operations" context menu to copy all the lossy files to the same directory, using the same "%artist%\%album%\%filename%" "%album artist%/%album%/[%discnumber%.]%tracknumber%. $if($meta(album artist),%artist% - ,)%title%" pattern. Check "copy entire source folder content."

3. FTP transfer contents of shadow library to Foobar2k iOS app.

a. Expose iOS Foobar music directory.
One of the nifty things about the Foobar2k iOS app is that it provides full access to the app's music directory via FTP. Under the "Tools" menu, there is an option for "FTP Server." Select that, create a username/password if you wish, then toggle "Allow write access" and finally "Server running." When you do that, it will give you a local network IP address.

b. Transfer shadow directory to iOS app. Use an FTP client from your PC. I used Filezilla; some programs, such as Filezilla Pro (paid) and FreeFileSync, can synchronize a local directory with a remote directory, but I haven't played around with that yet. Enter in the username, password, and port, and it will take you to the iOS app directory. If you're using Filezilla, make sure to increase the number of simultaneous downloads to 10. Upload the contents of your shadow directory into "foobar2000 Music Folder." This can take a few hours depending on the size of your music collection. But the nice thing is that since it's wireless you can do this at night with your phone charging by your bedside as normal.

Pros
- Free
- Wireless
- Accommodates gigantic libraries and actions can be undertaken all at once rather than on an album- or song-basis.
- If configured correctly (skipping existing files), all parts of the process can be interrupted and resumed without having to start over or causing corruption issues.
- It actually works!!! Which shouldn't be a big deal but iOS is so ornery that it's actually something of a minor miracle.

Cons
- The Foobar2k iOS app, while powerful and functional, lacks UI polish. Also, to my knowledge development has stopped.
- Transcoding and copying files to the shadow directory is not done automatically. It's only a few keystrokes, but it's more work than iTunes (back when it worked), which could transcode and sync any playlist you wanted, including smart playlists that could collect all new music, or all music rated 4 stars or higher, etc.
- With Apple Music and Amazon Music, having spatial audio enabled in the Airpods settings only activates spatial audio for spatial mixes. With Foobar, it's on all the time, and it makes the sound pan around when you tilt your head left and right. A completely useless feature that degrades audio quality to boot. You have to disable spatial audio, which means you can't use it for the apps that actually make good use of it without toggling it on and off. I figured out how to turn off the head tracking. Very unintuitive. Control center, long press on volume, then lower right toggle.
 
Last edited:
Sorry, this is just for my own use, but I guess edits are only allowed for a limited time?

This pattern eliminates a rare problem where the full path exceeds 255 characters and chaos ensues:
%album artist%/%album%/$cut([%discnumber%.]%tracknumber%. $if($meta(album artist),%artist% - ,)%title%, $sub(220, $len(%album artist%/%album%/)))
 
For years I've used iTunes to transfer a subset of the music library stored on my Windows PC to my iPhone. I would create a playlist containing all the music I wanted on my phone, plug my phone in, select the box in iTunes to transcode lossless files to 128kbps AAC, and then sync the playlist to my phone. I'd then use the Apple Music app to listen to music while on the go.

This worked brilliantly until it didn't. The latest (and last--development ceased years ago) version of iTunes mandates a backup for every sync, making the process unbearably slow. Attempts to use older versions of iTunes resulted in myriad problems. I spent a long time trying to find ways to get this to work. I'm a fair hand at computers, but I finally gave up.

So if not iTunes, what? Google isn't very helpful. Most "articles" I found are poorly written content mill pieces and appear to be for people who want to upload a file or two and don't mind playing tracks individually from a cloud app like Dropbox. I could not find any good Foobar or MusicBee solutions (MusicBee had a plugin but it relies on iTunes, natch). Apple's "walled garden" approach to iOS security makes things difficult. I saw some commercial tools available, but I wasn't about to spend money on something without having an idea whether it would actually work.

I finally figured out one way, and I will list the steps below for anyone else in the same predicament. If you know any other ways, or ways to improve the steps below, I'd appreciate any replies.

Edits are in red and removed text is crossed out.

1. Download the Foobar2K iOS app. Unfortunately this only works for Foobar2k, an app with a clunky UI that to my knowledge is not being actively worked on. On the plus side, it's fairly powerful and flexible, and we take advantage of its power here.

2. Prepare a shadow directory of all music library files to add to phone.

a. Create a playlist containing all songs to add to phone.
I did this with the Windows Foobar2k application, but I imagine it can be done with MusicBee and other "power user"-style music programs. I have a column that lists all albums in my library. I created a hotkey action within Foobar2k that sends selected items to a playlist. Unfortunately, the default is to create a new playlist and if you want to add the selections to a current playlist you have to type it in. Rather than try to figure out Foobar's scripting language, I made a simple macro script using a program called AutoHotkey that invoked the "send to playlist" command, paused for a few ms, then typed in the playlist name and pressed "Enter." Then I could select all the albums I wanted using CTRL-click, then hit the hotkey to move the tracks to my phone playlist.

b. Convert lossless tracks and copy lossy tracks to a shadow directory. Once the playlist was made, I used the "Convert" context menu to convert all lossless files to 128kbps Opus and place them in a "Phone Library" directory. For "Destination," I used "%artist%\%album%\%filename%" "%album artist%/%album%/[%discnumber%.]%tracknumber%. $if($meta(album artist),%artist% - ,)%title%", which recreates my folder structure. In the "Convert" window, under "Other", under "Copy other files to the destination folder," type in "*.jpg" or whatever filetype you use for album art. Then I used the "File Operations" context menu to copy all the lossy files to the same directory, using the same "%artist%\%album%\%filename%" "%album artist%/%album%/[%discnumber%.]%tracknumber%. $if($meta(album artist),%artist% - ,)%title%" pattern. Check "copy entire source folder content."

3. FTP transfer contents of shadow library to Foobar2k iOS app.

a. Expose iOS Foobar music directory.
One of the nifty things about the Foobar2k iOS app is that it provides full access to the app's music directory via FTP. Under the "Tools" menu, there is an option for "FTP Server." Select that, create a username/password if you wish, then toggle "Allow write access" and finally "Server running." When you do that, it will give you a local network IP address.

b. Transfer shadow directory to iOS app. Use an FTP client from your PC. I used Filezilla; some programs, such as Filezilla Pro (paid) and FreeFileSync, can synchronize a local directory with a remote directory, but I haven't played around with that yet. Enter in the username, password, and port, and it will take you to the iOS app directory. If you're using Filezilla, make sure to increase the number of simultaneous downloads to 10. Upload the contents of your shadow directory into "foobar2000 Music Folder." This can take a few hours depending on the size of your music collection. But the nice thing is that since it's wireless you can do this at night with your phone charging by your bedside as normal.

Pros
- Free
- Wireless
- Accommodates gigantic libraries and actions can be undertaken all at once rather than on an album- or song-basis.
- If configured correctly (skipping existing files), all parts of the process can be interrupted and resumed without having to start over or causing corruption issues.
- It actually works!!! Which shouldn't be a big deal but iOS is so ornery that it's actually something of a minor miracle.

Cons
- The Foobar2k iOS app, while powerful and functional, lacks UI polish. Also, to my knowledge development has stopped.
- Transcoding and copying files to the shadow directory is not done automatically. It's only a few keystrokes, but it's more work than iTunes (back when it worked), which could transcode and sync any playlist you wanted, including smart playlists that could collect all new music, or all music rated 4 stars or higher, etc.
- With Apple Music and Amazon Music, having spatial audio enabled in the Airpods settings only activates spatial audio for spatial mixes. With Foobar, it's on all the time, and it makes the sound pan around when you tilt your head left and right. A completely useless feature that degrades audio quality to boot. You have to disable spatial audio, which means you can't use it for the apps that actually make good use of it without toggling it on and off. I figured out how to turn off the head tracking. Very unintuitive. Control center, long press on volume, then lower right toggle.
FiiO Music does the same, but with added value. It copies individual files in the original *.flac format via the ftp protocol in Windows and, of course, also plays them. No conversions, no bullshit. And a decent player with rich settings as a bonus. Hiby Music can also copy via ftp, but generates errors in assigning songs to albums.
Both apps are available in the App Store.
 
FiiO Music does the same, but with added value. It copies individual files in the original *.flac format via the ftp protocol in Windows and, of course, also plays them. No conversions, no bullshit. And a decent player with rich settings as a bonus. Hiby Music can also copy via ftp, but generates errors in assigning songs to albums.
Both apps are available in the App Store.
Foobar is not user-friendly, but is actually pretty good once you get to know it. And of course it supports FLAC, but I only have 256GB on my phone and only a fraction of that to dedicate to music. With ~10K tracks, FLAC is not an option.
 
a. Expose iOS Foobar music directory. One of the nifty things about the Foobar2k iOS app is that it provides full access to the app's music directory via FTP. Under the "Tools" menu, there is an option for "FTP Server." Select that, create a username/password if you wish, then toggle "Allow write access" and finally "Server running." When you do that, it will give you a local network IP address.
I genuinely wonder how foobar2000 is able to do this. Whenever I Google how to transfer files between a Windows and an iOS you either need Jailbreak, cloud storage, some ransomware app, or you can only transfer in one direction (ex. only from iPhone to Windows, but not the other way around). I'm shocked at how easy it is to just drag and drop stuff onto my iPhone using a music player of all things.

By any chance, do you, or anyone browsing, know of a file transferring app that has Foobar's "FTP server" feature that allows full access to iOS's directory? I would LOVE to be able to connect to my phone via FTP and manage files using my Windows. iOS file management is just atrocious.

For now I created a "Transfer" folder in the foobar music folder and just dumped all my files in there. Works pretty well and really easy...
 
Also, I guess this is more for my own notes, transferring files with FTP will overwrite all "Date" fields to the current date. Important if the documents, images, etc. you are moving contain important date information. I recommend you append the original date of the file into its name if that matters to you.
 
Back
Top Bottom