Hi pillaisg,
test this code but sorry I'm not can help you
[code]
(defun c:test (/ all_file_name cnt code f1 f2 f3 f4
file_folder len nfile num ofile str x y)
(vl-load-com)
(setq file_folder "D:/YBI") ; set as your folder !!!
(setq all_file_name (cddr (vl-directory-files file_folder)))
(setq len (length all_file_name))
(setq cnt 0)
(setq code (getstring "\nEnter new area code
: "))
(if (= code "")(setq code "SGP"))
(setq x (strcat "100*"))
(setq num (getint "\nEnter start number<1>: "))
(if (= num nil)(setq num 1))
(repeat
len
(setq y (nth cnt all_file_name))
(if
(wcmatch y x)
(progn
(setq f1 (substr y 1 5))
(setq f3 (substr y 9 3))
(setq f4 (substr y 16 16))
(setq str (strcat f1 code f3 (itoa num) f4))
(setq nfile (strcat file_folder "/" str))
(setq ofile (strcat file_folder "/" y))
(vl-file-rename ofile nfile)
) ; progn
) ; if
(setq cnt (1+ cnt))
) ; repeat
(princ)
) ; defun
[/code]
wrote in message news:5800074@discussion.autodesk.com...
I am having some 500 sheets in which I have to change the Drawing Numbers.
The format of the drawing Number is as follows SGP-5-1000-001-R2-A1-0. In
which SGP is the area code,5 is the discipline code, 1000 is the drawing
number,R2 is the project code A1 is the sheet size and 0 is the revision.
I need to change the area code (SGP) and Drawing NUmber (1000) in all the
500 sheets. This drawing number is in an attribute format.
Thanks in advance