Based on your edit to your question, it looks like you need to parse out parts of the old path to build the new path. How about splitting up the old path into a list, then building the new path with parts of that list:
>>> import os
>>> old_path = "\\dgdbimg\EGD\Data\DTED_2"
>>> old_parts = old_path.split("\\")
>>> old_parts
['', 'dgdbimg', 'EGD', 'Data', 'DTED_2']
>>> new_path = os.path.join("C:\WorkSpace\Andy3", old_parts[3], old_parts[4])
>>> new_path
'C:\\WorkSpace\\Andy3\\Data\\DTED_2'
>>>
EDIT:
Have a meeting in a few minutes so quickly - here's what I'd do. Either manually push the dbf to a file geodatabase table or do it with code, then loop through the records of the table, and for each one use the parts to build the new path, then call the Repair Raster Catalogs Paths tool. Some psuedo-code:
push dbf to FGDB table (may be a tool to do this? or just do it manually in ArcCatalog)
loop through records in table
parse out old paths parts
build new path
repairRasterCatalogPaths_management()
Here is real (untested) code to try:
import arcpy
import os
arcpy.env.overwriteOutput = 1
arcpy.TableToTable_conversion("C:/Temp/CatalogPaths.dbf", "D:/target.gdb", "DbfToTable")
rows = arcpy.SearchCursor("D:/target.gdb/DbfToTable")
for row in rows:
old_path = str(row.getValue("Old_Path_Field"))
old_parts = old_path.split("\\")
new_path = os.path.join("C:\WorkSpace\Andy3", old_parts[3], old_parts[4])
arcpy.RepairRasterCatalogPaths_management("RepairRC.gdb\\Unmanaged", "FIX", old_path, new_path)
Is there a way to look in body of TAB file and search Definition Table for TYPE parameter ?
!table
!version 300
!charset WindowsLatin1
Definition Table
File "example.jpg"
Type "RASTER"
...
other types are
Type NATIVE Charset "WindowsLatin1"
...
Type LINKED Charset "WindowsLatin2" '(database linked table)
...
Type ODBC '(database 'live' table)
...
Type ASCII Delimiter 09 Titles Charset "WindowsLatin1"
...
Type XLS Titles Range "Sheet1"
...
Type WKS Titles
...
Type ACCESS TABLE "rdatbln_line" Charset "WindowsLatin1"
...
There's some detailed explanation :
http://georezo.net/jparis/mb_r/doc/Tab_file_format/tab_file_format.htm
Best Answer
From what I know, there is no property to automatically identify compressed file geodatabase with arcgis. But you can see this information in ArcCatalog : A compressed feature class or table has "(compressed)" in the Type column.
For routine check, you can also look for the .cdf files inside your .gdb folder using file searching methods (e.g. os.walk() or glob.glob() in Python).