Hi Joshua,
the scripts jumps first into the workspace directory with
dir = r"F:\Daten_Wolff\Topographische_Gefaehrdungsanalyse\Test_Source"
arcpy.env.workspace = dir
Then, inside the workspace directory, the list of gdbs is called by
gdbList = arcpy.ListWorkspaces('*','FileGDB')
for gdb in gdbList:
arcpy.env.workspace = gdb
Now it goes from gdb to gdb.
For each gdb, I then apply the classical list of Raster loop, not befor telling the target directory as "folder":
folder = r"F:\Daten_Wolff\Topographische_Gefaehrdungsanalyse\BlueSpot_50.gdb"+ "\\"
RasterList = arcpy.ListRasters('*_050')
for Raster in RasterList:
print("processing raster: %s" %os.path.join("env.workspace",Raster))
outRasterdataset = folder + arcpy.Describe(Raster).baseName
arcpy.CopyRaster_management (Raster, outRasterdataset, "DEFAULTS", "", "-999", "NONE", "NONE" , "32_BIT_FLOAT", "NONE", "NONE" )
This works in ArcPy 2.7.14 quite nicely so far.
I have exatly 5107 gdbs to be searched für fgdbr Raster with the name suffix '*_050' or '*_100' and so on. Not in all of thes gdbs are thes Raster with that exact suffices, but the script shecks them all! So far, from my 5107 gdbs the script copied nicely 4936 fgdbrs with the suffix '*_050' into my targed gdb. I directly added the same loops for more suffices, and its working calm and steadily on my VM.
All the best!
Ingo