| DRS | |
| Help |
|
Applies to |
DRS (Module: wmDRS.dll) |
|
Group |
DRD |
|
See also |
COPYCOMPONENTS, MOVECOMPONENTS |
Changes document component filenames to relative or absolute filenames.
Be careful when using this method because it may break links to component files. Therefore when about to copy or move component files to another location you should first copy the component files to the appropriate destination folder and then use the ChangePaths method. So you should not loose component file links and have the correct references in DRD afterwards.
If you want to copy or move component files together with the DRD you can use
the simpler methods COPYCOMPONENTS or MOVECOMPONENTS. However you do not have
complete control over file naming with those methods. In case of more specific
copy or move actions where you need more control over file naming or conditional
skipping of several component files then this method helps you to correct DRD
file links after component files are copied or moved.
DRDCHANGEPATHS [<ChangeToRelative>][, <Path>][, <DRDName>]
|
Part |
Description | |
| <ChangeToRelative> | (optional, 1|0) If 1 component file paths are changed to be relative to the given path (or current DRD file path if path parameter is missing). Default is 1. | |
| <Path> | (optional) Root path for relative filenames or component file path if changing to absolute filenames. If missing then path of currently loaded DRD file applies. If no path is passed and DRD was created in memory without loading an existing one then if changing to relative path filenames only are used and if changing to absolute path nothing is done. | |
| <DRDName> | DRD key. | |
|
| ||
READDRDFROMFILE Result, "F:\Poll\Import\12345.drd"
;Assuming component
files are in the same folder...
DRDCHANGEPATHS 1, "F:\Poll"
;...will
change all filenames to Import\<FileName>
DRDCHANGEPATHS 1
;...will
change all filenames to filename only!
DRDCHANGEPATHS 0,
"F:\Poll"
;...will change all filenames to
F:\Poll\<FileName>
;Attention! Last two lines may break links to
component files!