Skip to content.
CCB > CCBSIGS > ShapeToolLibraryProgram > DirectoryTool

DirectoryTool

Overview

DirectoryTool Provides cross platform directory utilities useful in creating application protocols.

Usage Summary

Argument Type Required Description Notes
-dir Directory Yes Path to the directory examined by this application.  
-list File No Path to a file which will be written with a listing of the directory contents. This is not a recursive listing. Path name conventions are those of the local operating system.
-overwrite flag No Enable replacement of existing output files.  
-echo flag No Write directory contents to standard output.  
-regexp String No A regular expression pattern which listed files must match. This pattern follows the Java Regular expression conventions.
-contains String No Specifies a pattern which listed files must contain  
-startsWith String No Specifies a pattern with which listed files must start  
-endsWith String No Specifies a pattern with which listed files must end  
-help flag No Prints help and usage information.  
-version flag No Prints version number of this application.  
-verbose flag No Enables detailed status messages.  
-license flag No Prints license details, and exits.  
-twiki flag No Writes command line arguments as a TWiki format table to output and exit.  
-pipeline flag No Write pipeline descriptor file to output and exit.  
-pipelineJar String No Specify path to an application jar file, as a pipeline resource. Example: "pipeline://localhost//home/zed/Connery.jar"
-pipelineJvm String No Specify a Java Virtual Machine called by a pipeline.  
-pipelineJvmOptions String No Specify Java Virtual Machine options used by a pipeline.  

Examples

create a file containing a list all ucf files in a particular directory

The directory (folder) named "ucf_data" is searched for files whose name ends with ".ucf". Files matching this pattern are saved to a text file named "ucf_list".

java -jar DirTool.jar -dir ucf_data -endsWith .ucf -list ucf_list

The contents of the file 'ucf_list' are

ucf_data/mni_01_hippo_l.ucf
ucf_data/mni_01_hippo_r.ucf
ucf_data/mni_02_hippo_l.ucf
ucf_data/mni_02_hippo_r.ucf
ucf_data/mni_03_hippo_l.ucf
ucf_data/mni_03_hippo_r.ucf
ucf_data/mni_04_hippo_l.ucf
ucf_data/mni_04_hippo_r.ucf
ucf_data/mni_05_hippo_l.ucf
ucf_data/mni_05_hippo_r.ucf
ucf_data/mni_06_hippo_l.ucf
ucf_data/mni_06_hippo_r.ucf
ucf_data/mni_07_hippo_l.ucf
ucf_data/mni_07_hippo_r.ucf
ucf_data/mni_08_hippo_l.ucf
ucf_data/mni_08_hippo_r.ucf
ucf_data/mni_09_hippo_l.ucf
ucf_data/mni_09_hippo_r.ucf
ucf_data/mni_10_hippo_l.ucf
ucf_data/mni_10_hippo_r.ucf
ucf_data/mni_11_hippo_l.ucf
ucf_data/mni_11_hippo_r.ucf
ucf_data/mni_12_hippo_l.ucf
ucf_data/mni_12_hippo_r.ucf