2020-01-23, 21:57
Hier ein kleines Beispiel, wie man mit Powershell ein Verzeichnis wegsichern kann, in diesem Fall eine Minecraft-Welt. Nützlich als Backup oder wenn man auf unterschiedlichen Rechnern spielt.
$datum = Get-Date -Format "yyyy-MM-dd_HHmm"
$maschine = $env:computername
$quelle = "C:\Users\Uwe\AppData\Roaming\.minecraft\saves\New World"
$ziel = "C:\Users\Uwe\Nextcloud\minecraft-" + $maschine + "_" + $datum + ".zip"
Compress-Archive -Path $quelle -DestinationPath $ziel |
$datum = Get-Date -Format "yyyy-MM-dd_HHmm"
$maschine = $env:computername
$quelle = "C:\Users\Uwe\AppData\Roaming\.minecraft\saves\New World"
$ziel = "C:\Users\Uwe\Nextcloud\minecraft-" + $maschine + "_" + $datum + ".zip"
Compress-Archive -Path $quelle -DestinationPath $ziel
Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined.
Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.
More Posts - Website