Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing PCL Code In Multiple Documents

Status
Not open for further replies.

kriscorrie

IS-IT--Management
Oct 5, 2005
2
GB
Hello,

Im not entirely sure how to do this, but i need to change a string of pcl code stating that a document is to be printed duplex and make it print simplex.

I have multiple documetns in one folder, i wonder if its possible to run some sort of script that will search and replace the code within multiple documents at a time???

anyone know of anything

thanks

kristofer
 
Im sure it is. I would write a program that asks what the file extension is (assuming they are all the same), then
asks what the string to change is, then the string to change it to.

open the files 1 at a time in binary mode loading the entire file then search for the string, replace it, then
put the modified string back out to the file.

(might also include a notification of whether it found
the string to be changed or not which would help if there
are a lot of files - you would know the program is, in fact,
doing it's job.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top