You can manage raster image name, file name, and file path using the properties of the Raster object.
The path and file name of an image is queried or changed using the ImageFile property. The path set by this property is the actual path where AutoCAD looks for the image.
If AutoCAD cannot locate the drawing (for example, if you have moved the file to a different directory than the one saved with the ImageFile property), it removes relative or absolute path information from the name (for example, \images\tree.tga or c:\my project\images\tree.tga becomes tree.tga) and searches the paths you have defined using the SetProjectFilePath method on the Preferences object. If the drawing is not located in the paths, it attempts the first search path again.
You can remove the path from the file name or specify a relative path by resetting the ImageFile property.
Changing the path in the ImageFile property does not affect the project files' search-path settings.
Image names are not necessarily the same as image file names. When you attach an image to a drawing, AutoCAD uses the file name without the file extension as the image name. You can change the image name without affecting the name of the file.
The image file is represented by the ImageFile property on the Raster object. Changing the ImageFile property will change the image in the drawing. The image name is represented by the Name property, and changing the Name property will change the name of the image only, not the file associated with it.