[Toc][Index]

GLOBAL - Execute a command all subdirectories

 
 Purpose:    Execute a command in the current directory and its 
             subdirectories. 
             
 Format:     GLOBAL [/H /I /P /Q] command 
             
             command :  The command to execute, including arguments and 
             switches. 
             
             /H(idden directories)           /P(rompt) 
             /I(gnore exit codes)            /Q(uiet) 
 
 Usage 
 GLOBAL performs the command first in the current directory and then in 
 every subdirectory under the current directory.  The command can be an 
 internal command, an alias, an external command, or a batch file. 
 This example copies the files in every directory on drive A to the 
 directory C:\TEMP : 

 
         [a:\] global copy *.* c:\temp
 
 
 If you use the /P option, GLOBAL will prompt for each subdirectory before 
 performing the command.  You can use this option if you want to perform 
 the command in most, but not all subdirectories of the current directory. 
 
 You can use command grouping to execute multiple commands in each 
 subdirectory.  For example, the following command copies each .TXT file 
 in the current directory and all of its subdirectories to drive A.  It 
 then changes the extension of each of the copied files to .SAV : 

 
         [c:\] global (copy *.txt a: & ren *.txt *.sav)
 
 
 Options 
    /H:     (Hidden directories) Forces GLOBAL to look for hidden 
            directories.  If you don't use this switch, hidden directories 
            are ignored. 
    /I:     (Ignore exit codes) If this option is not specified, GLOBAL 
            will terminate if the command returns a non-zero exit code. 
             Use /I if you want the command to continue in additional 
            subdirectories even if it returns an error in one 
            subdirectory.  Even if you use /I, GLOBAL will hnormally alt 
            execution if the command processor receives a Ctrl-C or 
            Ctrl-Break. 
    /P:     (Prompt) Forces GLOBAL to prompt with each directory name 
            before it performs the command.  Your options at the prompt 
            are explained in detail under Page and File Prompts. 
    /Q:     (Quiet) Do not display the directory names as each directory 
            is processed. 
 

Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs