SlideShare a Scribd company logo
1 of 1
%!
% PostScript program for distilling and combining an entire folder or
% directory of PostScript files.
% When embedding font subsets, it is highly recommended you use this technique
% to distill multiple PS files so only one font subset is used for each font.

/PathName (Macintosh HD:Test:*.ps) def        % Edit this to point to the folder
                                          %      containing the PS files.

/RunDir {                        % Uses PathName variable on the operand stack
      { /mysave save def            % Performs a save before running the PS file
          dup = flush            % Shows name of PS file being run
          RunFile                % Calls built in Distiller procedure
          clear cleardictstack   % Cleans up after PS file
          mysave restore         % Restores save level
      }
      255 string
      filenameforall
} def

PathName RunDir

% INSTRUCTIONS
%
% 1. Place all PostScript files to be distilled and concatenated in a single
%    directory. For example, here are example names of PS files that might
%    be used to distill a book:
%
%       ac001.ps Cover
%       bt001.ps Table of Contents
%       ch001.ps Chapter 1
%       ch002.ps Chapter 2
%       ch003.ps Chapter 3
%       in001.ps Index
%
% 2. Make a copy of this file and give it the name you want to have as the
prefix
%    for the resulting file. For example, you could name this file MyBook.txt.
%
% IMPORTANT: Don't use the .ps suffix if this file is in the same folder as the

%   rest of your .ps files. The RunDir command will execute all files that end
in
% .ps and this file will be distilled twice!
%
% 3. Redefine the variable "PathName" above to point to the folder/directory
which
%     contains your PS files.
%
%        Macintosh pathname syntax: /PathName (Macintosh HD:Folder:*.ps) def
%        Windows pathname syntax:    /PathName (c:/mydir/*.ps) def
%            UNIX pathname syntax:    /PathName (./mydir/*.ps) def
%
%        Note: The syntax for Windows may look strange, but double escaping the
%              backslash character is required when using filenameforall.
%
% 4. Distill the file on the machine running Acrobat Distiller.

More Related Content

What's hot

Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell ScriptingMustafa Qasim
 
Raspberry pi Part 4
Raspberry pi Part 4Raspberry pi Part 4
Raspberry pi Part 4Techvilla
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programmingsudhir singh yadav
 
How to reset root passwords on rhel 7 and cent os 7 linux systems
How to reset root passwords on rhel 7 and cent os 7 linux systemsHow to reset root passwords on rhel 7 and cent os 7 linux systems
How to reset root passwords on rhel 7 and cent os 7 linux systemsVoeurng Sovann
 
system management -shell programming by gaurav raikar
system management -shell programming by gaurav raikarsystem management -shell programming by gaurav raikar
system management -shell programming by gaurav raikarGauravRaikar3
 
Unit 11 configuring the bash shell – shell script
Unit 11 configuring the bash shell – shell scriptUnit 11 configuring the bash shell – shell script
Unit 11 configuring the bash shell – shell scriptroot_fibo
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell ScriptingRaghu nath
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command ShellTushar B Kute
 
OpenGurukul : Language : Shell Scripting
OpenGurukul : Language : Shell ScriptingOpenGurukul : Language : Shell Scripting
OpenGurukul : Language : Shell ScriptingOpen Gurukul
 
Unix Shell Script
Unix Shell ScriptUnix Shell Script
Unix Shell Scriptstudent
 
Shell programming 1.ppt
Shell programming  1.pptShell programming  1.ppt
Shell programming 1.pptKalkey
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell ScriptingRaghu nath
 

What's hot (18)

Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell Scripting
 
Chap06
Chap06Chap06
Chap06
 
Raspberry pi Part 4
Raspberry pi Part 4Raspberry pi Part 4
Raspberry pi Part 4
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programming
 
Shell programming
Shell programmingShell programming
Shell programming
 
How to reset root passwords on rhel 7 and cent os 7 linux systems
How to reset root passwords on rhel 7 and cent os 7 linux systemsHow to reset root passwords on rhel 7 and cent os 7 linux systems
How to reset root passwords on rhel 7 and cent os 7 linux systems
 
system management -shell programming by gaurav raikar
system management -shell programming by gaurav raikarsystem management -shell programming by gaurav raikar
system management -shell programming by gaurav raikar
 
Unit 11 configuring the bash shell – shell script
Unit 11 configuring the bash shell – shell scriptUnit 11 configuring the bash shell – shell script
Unit 11 configuring the bash shell – shell script
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell Scripting
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
 
Basics of shell programming
Basics of shell programmingBasics of shell programming
Basics of shell programming
 
OpenGurukul : Language : Shell Scripting
OpenGurukul : Language : Shell ScriptingOpenGurukul : Language : Shell Scripting
OpenGurukul : Language : Shell Scripting
 
Unix Shell Script
Unix Shell ScriptUnix Shell Script
Unix Shell Script
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Unix shell scripting tutorial
Unix shell scripting tutorialUnix shell scripting tutorial
Unix shell scripting tutorial
 
Shell programming 1.ppt
Shell programming  1.pptShell programming  1.ppt
Shell programming 1.ppt
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell Scripting
 
Scripting and the shell in LINUX
Scripting and the shell in LINUXScripting and the shell in LINUX
Scripting and the shell in LINUX
 

Similar to Rundirex

Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritpingchockit88
 
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS
 
file_handling_in_c.ppt
file_handling_in_c.pptfile_handling_in_c.ppt
file_handling_in_c.pptyuvrajkeshri
 
Linux Command Line - By Ranjan Raja
Linux Command Line - By Ranjan Raja Linux Command Line - By Ranjan Raja
Linux Command Line - By Ranjan Raja Ranjan Raja
 
Linux commands
Linux commandsLinux commands
Linux commandsU.P Police
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manualSaikat Rakshit
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manualCraig Cannon
 
unix_ref_card.pdf
unix_ref_card.pdfunix_ref_card.pdf
unix_ref_card.pdfGiovaRossi
 
unix_ref_card.pdf
unix_ref_card.pdfunix_ref_card.pdf
unix_ref_card.pdfGiovaRossi
 
unix_ref_card.pdf
unix_ref_card.pdfunix_ref_card.pdf
unix_ref_card.pdfGiovaRossi
 
390aLecture05_12sp.ppt
390aLecture05_12sp.ppt390aLecture05_12sp.ppt
390aLecture05_12sp.pptmugeshmsd5
 
Using the command line on macOS
Using the command line on macOSUsing the command line on macOS
Using the command line on macOSAdamFallon4
 
Building File Systems with FUSE
Building File Systems with FUSEBuilding File Systems with FUSE
Building File Systems with FUSEelliando dias
 

Similar to Rundirex (20)

Rundirex
RundirexRundirex
Rundirex
 
Unix cmd
Unix cmdUnix cmd
Unix cmd
 
Directories description
Directories descriptionDirectories description
Directories description
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
 
Unix Basics For Testers
Unix Basics For TestersUnix Basics For Testers
Unix Basics For Testers
 
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
 
file_handling_in_c.ppt
file_handling_in_c.pptfile_handling_in_c.ppt
file_handling_in_c.ppt
 
Linux Command Line - By Ranjan Raja
Linux Command Line - By Ranjan Raja Linux Command Line - By Ranjan Raja
Linux Command Line - By Ranjan Raja
 
Linux
LinuxLinux
Linux
 
Linux commands
Linux commandsLinux commands
Linux commands
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
 
unix_ref_card.pdf
unix_ref_card.pdfunix_ref_card.pdf
unix_ref_card.pdf
 
unix_ref_card.pdf
unix_ref_card.pdfunix_ref_card.pdf
unix_ref_card.pdf
 
unix_ref_card.pdf
unix_ref_card.pdfunix_ref_card.pdf
unix_ref_card.pdf
 
390aLecture05_12sp.ppt
390aLecture05_12sp.ppt390aLecture05_12sp.ppt
390aLecture05_12sp.ppt
 
Using the command line on macOS
Using the command line on macOSUsing the command line on macOS
Using the command line on macOS
 
Building File Systems with FUSE
Building File Systems with FUSEBuilding File Systems with FUSE
Building File Systems with FUSE
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
 
Files nts
Files ntsFiles nts
Files nts
 

Rundirex

  • 1. %! % PostScript program for distilling and combining an entire folder or % directory of PostScript files. % When embedding font subsets, it is highly recommended you use this technique % to distill multiple PS files so only one font subset is used for each font. /PathName (Macintosh HD:Test:*.ps) def % Edit this to point to the folder % containing the PS files. /RunDir { % Uses PathName variable on the operand stack { /mysave save def % Performs a save before running the PS file dup = flush % Shows name of PS file being run RunFile % Calls built in Distiller procedure clear cleardictstack % Cleans up after PS file mysave restore % Restores save level } 255 string filenameforall } def PathName RunDir % INSTRUCTIONS % % 1. Place all PostScript files to be distilled and concatenated in a single % directory. For example, here are example names of PS files that might % be used to distill a book: % % ac001.ps Cover % bt001.ps Table of Contents % ch001.ps Chapter 1 % ch002.ps Chapter 2 % ch003.ps Chapter 3 % in001.ps Index % % 2. Make a copy of this file and give it the name you want to have as the prefix % for the resulting file. For example, you could name this file MyBook.txt. % % IMPORTANT: Don't use the .ps suffix if this file is in the same folder as the % rest of your .ps files. The RunDir command will execute all files that end in % .ps and this file will be distilled twice! % % 3. Redefine the variable "PathName" above to point to the folder/directory which % contains your PS files. % % Macintosh pathname syntax: /PathName (Macintosh HD:Folder:*.ps) def % Windows pathname syntax: /PathName (c:/mydir/*.ps) def % UNIX pathname syntax: /PathName (./mydir/*.ps) def % % Note: The syntax for Windows may look strange, but double escaping the % backslash character is required when using filenameforall. % % 4. Distill the file on the machine running Acrobat Distiller.