Last active
June 23, 2020 03:05
-
-
Save TomRichter/dee0aa1cf3c7ca92db4a7f38e970c5b4 to your computer and use it in GitHub Desktop.
Hard-links EVE Online config files to keep them roughly in sync.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this script in an Admin(!) Powershell within your EVE settings folder. | |
# Open the %localappdata%\CCP\EVE folder to dig for the actual settings folder. | |
# e.g., %localappdata%\CCP\EVE\CCP\EVE\c_eve_sharedcache_tq_tranquility\settings_Low_Graphics | |
# Set these to the char and user file you want to mirror from. | |
$charSource = Get-ChildItem "core_char_####.dat" | |
$userSource = Get-ChildItem "core_user_####.dat" | |
function HardLink-Many | |
{ | |
param( | |
$sourceFile, | |
$targetFiles | |
) | |
ForEach($target in $targetFiles) | |
{ | |
if($target.Name -ne $sourceFile.Name) | |
{ | |
$targetPath = $target.FullName | |
Remove-Item -Path $targetPath | |
New-Item -Path $targetPath -ItemType HardLink -Value $sourceFile.FullName | |
} | |
} | |
} | |
$charTargets = Get-ChildItem "." | Where-Object {$_.Name -match "core_char_[0-9]+.dat"} | |
HardLink-Many $charSource $charTargets | |
$userTargets = Get-ChildItem "." | Where-Object {$_.Name -match "core_user_[0-9]+.dat"} | |
HardLink-Many $userSource $userTargets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment