If you are storing the file paths as full paths (as opposed to relative), you may encounter some problems if you want to move the location of the images, reports etc. You could manually go through and update the paths, or you can use these simple field calculations.
Change File Paths
FileField = [FILE_PATH]
OrigPath = "D:\Temp"
NewPath = "C:\temp"
output = Replace( FileField , OrigPath, NewPath )
Remove File Path
FileField = [FILE_PATH]
iLength = Len ( FileField )
iLastInd = InStrRev ( FileField , "\" )
iDif = iLength - iLastInd
output = Right ( FileField , iDif )
To use them:
- Open the table of the feature class in ArcMap
- Start an edit session
- Right click on the column header, and select Field Calculator
- Click the advanced check box
- Copy the script into the "Pre-Logic VBA Script Code" box
- Replace the FileField property to the field that contains the file path in your feature class (delete the [FILE_PATH] part, and double click the appropriate field in the Fields List of the calculator)
- If changing the file path, update the OrigPath and NewPath variables
- Type output into the bottom box
- Click ok
- Save your edits
No comments:
Post a Comment