New
#1
Script to find a specific USB drive and copy a file?
I need help writing a script to find a specific USB flash drive and copy a file. I know the path to the file except for the drive letter. The USB flash drive could be any of 3 - call them USB_Drive1, USB_Drive2, and USB_Drive3. The actual copy is no problem, but I have no idea how to find the drive letter.
The script has to run on both Windows 10 and very old (by definition) Windows 7. I assume the the Win7 systems have PowerShell 3.0 but I don't know for sure.
Are there any sample scripts I can look at to help me along? I'm completely PS-illiterate so I'm likely to as lots more questions if the examples are in PS.
I'm running Win 10 20H2, build 19042.1110, but that's not very meaningful information since the script has to run on Win7.