REDIR (Express Tool)

Redefines hard-coded paths in xrefs, images, shapes, styles, and rtext.

Note: The following objects are not modified by REDIR: rtext objects in xrefs and block definitions, images in xrefs, and Big Fonts in externally referenced styles. Externally referenced text styles, shape files, and nested xrefs may be temporarily modified by this command. For changes of this nature to persist, edit the externally referenced drawings and use REDIR in them. REDIR changes may not be apparent until the drawing is regenerated.

Command: REDIR

Current REDIRMODE: Styles,Xrefs,Images,Rtext

Find and replace directory names

Enter old directory (use '*' for all), or ? <options>: Specify the folder to be replaced or press Enter for options (see REDIRMODE for option descriptions)

Replace "*" with: Specify a new folder or press Enter to specify an empty string (see tip below.)

Tip: To strip all the paths, use the * option at the Enter Old Directory prompt, and press Enter at the Replace With prompt, without entering a string. This forces AutoCAD to look for the files in one of the folders specified in the support files search path.
Tip: Because REDIR acts as a find-and-replace function, you can enter just part of a path name. For example if you enter "here" at the Old Directory prompt, and enter "his" at the Replace With prompt, the folder 'c:\here\there\' would become 'c:\his\this\'.

Example 1: List the current path associations and then change them

Command: REDIR
Current REDIRMODE: Styles,Xrefs,Images,Rtext
Find and replace directory names
Enter old directory (use '*' for all), or ? <options>: Enter ?
File references to list <*>: Press Enter
TYPE   NAME            FILE
----------------------------------------------------------------------------------------------------------
STYLE  STANDARD        TXT
STYLE  TTF             ARIAL.TTF
STYLE  XREFA|STANDARD  TXT
STYLE  XREFA|TTF       ARIAL.TTF
SHAPE  I:\WORK\TEST\ES.SHX

XREF   XREFA           I:\WORK\TEST\XREFA.DWG

IMAGE  THATCH          I:\work\TEST\brick2.bmp
IMAGE  XREFA|THATCH    THATCH

RTEXT  I:\work\TEST\57072_b.txt

Enter old directory (use '*' for all), or ? <options>: I:\WORK\TEST\
Replace "I:\WORK\TEST\" with: K:\TEST

Searching for old dir: I:\WORK\TEST
in order to replace it with: K:\TEST

XREF   XREFA           I:\WORK\TEST\XREFA.DWG -> K:\TEST\XREFA.DWG
SHAPE  I:\WORK\TEST\ES.SHX -> K:\TEST\ES.SHX
IMAGE  THATCH          I:\WORK\TEST\BRICK2.BMP -> K:\TEST\BRICK2.BMP
RTEXT  I:\work\TEST\57072_b.txt -> K:\TEST\57072_B.TXT

1 style/shape records modified.
1 image references modified.
1 xrefs modified.
1 rtext objects modified.
Changes to some externally referenced objects may be temporary.

Example 2: Strip all hard-coded paths

Command: REDIR
Current REDIRMODE: Styles,Xrefs,Images,Rtext
Find and replace directory names
Enter old directory (use '*' for all), or ? <options>: Enter *
Replace "*" with: Press Enter

Searching for old dir: *
in order to replace it with:

XREF   XREFA           K:\TEST\XREFA.DWG -> XREFA.DWG
SHAPE  K:\TEST\ES.SHX -> ES.SHX

IMAGE  THATCH          K:\TEST\BRICK2.BMP -> BRICK2.BMP

RTEXT  K:\TEST\57072_B.TXT -> 57072_B.TXT

1 style/shape records modified.
1 image references modified.
1 xrefs modified.
1 rtext objects modified.
Changes to some externally referenced objects may be temporary.

File

redir.lsp