I have an external USB drive that I use for backups. The backups are performed by a PowerShell script. My problem is that the drive letters change frequently, as other USB drives are plugged in and unplugged.
I updated the PowerShell script to determine the drive letter based on the volume name, which does not change. Here is the code that does this:
function GetDriveLetter($volume_name) { $drive = Get-WmiObject win32_logicaldisk | Where-Object {$_.VolumeName-eq $volume_name } | select -ExpandProperty DeviceID if ($drive -eq $null) { Throw "Cannot find drive with volume name of " + $volume_name } return $drive }
Title | Date |
EBTCalc (Android) Version 1.53 is now available | May 19, 2024 |
Vault 3 Security Enhancements | October 24, 2023 |
Vault 3 is now available for Apple OSX M2 Mac Computers! | September 18, 2023 |
Vault (for Desktop) Version 0.77 Released | March 26, 2023 |
EBTCalc (Android) Version 1.44 is now available | October 12, 2021 |
Vault (Desktop) Version 0.72 Released | October 6, 2021 |
EBT Compass is Now Available for Android Devices | June 2, 2021 |