IBM / mac-ibm-migration-tool

macOS Utility to facilitate the mass migration of files/apps/preferences between devices.
Apache License 2.0
47 stars 4 forks source link

[Feature Request] Allow for constructing paths in the user's home folder using variables in a profile #17

Open ryangball opened 1 week ago

ryangball commented 1 week ago

Is your feature request related to a problem? Please describe. Currently paths that begin with ~ are excluded from transfer. Providing a way to exclude paths in the user's home folder using a variable in a profile would be a great addition.

Describe the solution you'd like

Plist that looks like this:

<key>excludedPathsList</key>
<array>
    <string>$HOME/Documents/macOS Installers</string>
    <string>$HOME/Documents/Playgrounds</string>
    <string>$HOME/Music</string>
</array>

Then we replace the $HOME variable in each path with the actual user's home using:

FileManager.default.homeDirectoryForCurrentUser
// or
NSHomeDirectory()