Novell Cool Solutions

Change

wschreiber

By:

September 26, 2005 2:45 pm

Reads:4,168

Comments:0

Score:Unrated

Print/PDF

Change.exe allows you to do bulk changes in single or multiple files. You can do search and replace, automatic or interactive, and apply various include/exclude criteria.

Syntax: CHANGE <filespec> /find= [options]
Each change will be shown and must be confirmed on the screen.
Pathnames and wildcards in filename are allowed.
 
Options: Optional parameters are:
  /replace=yyy   :   replacement text
  /u   :   ignore upper/lower cases
  /noconfirm   :   replace without confirmation
  /silent  :   replace without confirmation or display
  /verbose   :   verbose – display unchanged lines
  /sub   :   recurse through subdirectories
  /blanks  :   use ‘_’ to represent blanks in command line
  /quiet   :   quiet: do not display current file name
  /include=xxx   :   replace only if line contains xxx
  /exclude=xxx   :   replace only if line does not contain xxx
  /Pinclude=xxx   :   replace only if page contains xxx
  /Pexclude=xxx   :   replace only if page does not contain xxx
  Options are not case-sensitive and entered in any order.
  They may be appreviated as long as kept identifiable
 
Place Holders: Optional Place Holders:
  #CR   :   CRLF
  #TAB: tabulator
  #-#:empty string
  #PERC:’%’ character (may be req’ed in batch jobs)
  #QUOTE: ‘”‘ character
  #EOL: End of line
  #BOL: Begin of line
  #TIME:current time
  #DATE:current date
  #PATH:path name
  #FILE:file name
  #LINE:line number
  #COUNT: incremental counter (start: 1)
 
Examples: CHANGE P:SUB\*.DOC /Find=IBM /Repl=Novell /u
  CHANGE ABC.TXT /Find=IBM /Repl=”” /n /i /w
  CHANGE ABC.TXT /F=”This one” /Excl=”That one” /s
  CHANGE ABC.TXT /F=This_one /R=That_one /w /b
  CHANGE *.TXT /F=today /R=#DATE /s
  CHANGE *.TXT /F=good /R=evil /pinc=Microsoft

Restrictions: You need sufficient rights and disk space
Blanks in strings must be quoted or represented by ‘_’
Only ASCII text files are allowed

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...Loading...


Categories: Uncategorized

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS