DonationCoder.com Software > Coding Snacks
Automatically adding custom-folder music to iTunes 12.x +
dcsev:
Hi all,
I am sure if this is within the scope of DC, but it's worth a shot and it seems people all over the Internet want something like this. I can't believe no one has coded anything that currently works on the Internet for this. The closest thing I've found is called "iTunesFolderWatch" located here: http://albumbrowser.klarita.net/itfw.html, but it's not maintained, costs $, doesn't work, requires .NET 2.0 which i'm finding is difficult to find on the Internet, and most importantly NOT portable.
Basically, a lot of people like me keep their music in D:\ directory instead of the standard C drive just in case they need to reinstall. Unfortunately, iTunes does NOT allow you to "automatically" add music to its library, unless you use a very specific folder deep in the C drive.
Asks:
1. Program must watch a specific folder(s) and automatically adds the music to the iTunes library (like this pic: http://albumbrowser.klarita.net/itfw3.png)
2. Must be lightweight
3. Must be able to minimize in tray
4. MUST be portable (pretty please!). All settings should be contained within the folder.
Is this a proper ask?
c.gingerich:
@dcsev - I use Link Shell Extension for this - http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html
I keep my music on an external drive and just create a hardlink to the music folder on C:. Works great for me.
It doesn't give the tray alerts but is easy and simple.
wraith808:
I was actually working on something that would work for this, but life got in the way of finishing it. Hopefully soon. But there are a few alternatives out there to watch directories and then do things based on the directory changing. An easy alternative is also PowerShell. I have the following script running as my first step to creating that program.
--- Code: PowerShell ---### 1. Setup folder to watch (it's currently set to the default download directory with my username commented out)### 2. Should it watch subdirectories? I have it set to false since my process copies to the subdirectories### 3. Set file filters- I have it set to all files $dirWatcher = New-Object System.IO.FileSystemWatcher $dirWatcher.Path = "C:\Users\<username>\Downloads" $dirWatcher.Filter = "*.*" $dirWatcher.IncludeSubdirectories = $false $dirWatcher.EnableRaisingEvents = $true ### 4. Define your action for when an event is raised.### This is currently a multi-part action, logging it, then running my cleanup program $watcherAction = { $path = $Event.SourceEventArgs.FullPath $changeType = $Event.SourceEventArgs.ChangeType $logEntry = "$(Get-Date), $changeType, $path" Add-content "C:\Users\<username>\Downloads\DirSweeper\log.txt" -value $logEntry [System.Diagnostics.Process]::Start("C:\Users\<username>\Downloads\DirSweeper\DirSweeper.exe") } ### Decide which events to watch (I only watch for files being created) Register-ObjectEvent $dirWatcher "Created" -Action $watcherAction### Register-ObjectEvent $dirWatcher "Changed" -Action $watcherAction### Register-ObjectEvent $dirWatcher "Deleted" -Action $watcherAction### Register-ObjectEvent $dirWatcher "Renamed" -Action $watcherAction while ($true) {Start-Sleep 5}
Just kill the window when you want to stop it. That command I have in there to my other program can be anything that you want to script to do the copying. Thanks to 4wd for getting me back into PowerShell scripting.
dcsev:
@dcsev - I use Link Shell Extension for this - http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html
I keep my music on an external drive and just create a hardlink to the music folder on C:. Works great for me.
It doesn't give the tray alerts but is easy and simple.
-c.gingerich (February 11, 2019, 10:10 AM)
--- End quote ---
I didn't think of that. I suppose I could use a hard junction link to sync the directories without running the app. I'll try this and see if it works.
dcsev:
Any chance of getting a lightweight app to do this?
The powershell seems like an inelegant solution. Might have to do the junction links, but I have no idea how iTunes will handle it. I don't keep itunes running 24/7 - only when I want to sync music to my phone.
Navigation
[0] Message Index
[#] Next page
Go to full version