I have a script that copies a template GDB to a folder and then I work off of that GDB. The script works perfectly, except when I choose my USB drive. I can copy it to a network drive or my c drive, but it's not working to my D drive and I have no idea why.
Here's the code:
Output_Location = parameters[2].valueAsText
outputGDB = "RSD2NIS_Output.gdb" #additional code later to add a prefix
NIS_Schema = 'C:\\Program Files (x86)\\NCSII Configuration Files\\Checkout_Replica\\Checkout_Replica_Template.gdb'
RSD_FGDB = os.path.join(Output_Location, outputGDB)
arcpy.management.Copy(NIS_Schema, RSD_FGDB)
arcpy.AddMessage("Created new geodatabase: " + RSD_FGDB)
And here are the results (K is network drive; D is USB drive):
When it fails, there is a copy of the original database in the D drive folder that has not been renamed. And the template seems to have everything it should- it just hasn't been renamed and that's where it failed. I've tried a lot of different folders and any folder on the D drive files while it works fine elsewhere. Any ideas?
**UPDATE**
It also fails if the template is on the D drive no matter where I try to save it to. And, I can run copy from within ArcPro Geoprocessing without issues to the d drive- it only fails when going through python.
usb drives are "sort of" drives. Their utility and functionality can vary widely between manufacturers.
Use them for backups copies saved using your operating system (eg File Explorer in Windows) and not other applications (generally)