#!/bin/csh -f #------------------------------------------------------------------------------ # # File file_list # # This program was written by Patrick Collins and Duncan Galloway during 1995. # # The program acts as a filter into Data Explorer (DX) to provide a list of # filenames fulfilling some pattern which can then be selected and imported. # Usage is (in the import statement of the DX network you are using) # # file_list # # An example network to make DX use this filter might look like this: # # +----------+ # | Import | file_list /homes/users2/duncang/modelout/pom "*.dx" # +----------+ # | # +----+-------+ # | | # | +------------+ # | | Selector | Acts as the dialog box to choose the file # | +------------+ # | | # | +-------+ # | | # +--------+ # | Select | Selects the full path and filename string from the list # +--------+ # | # | # +----------+ # | Import | Imports the data # +----------+ # | # \!/ # Continue on with # the network # # Notes. # # 1. It is best to put double quotes around the filename wildcard incase AIX # decides to expand out the thing within the program. Within the import field # you can do this by putting a backslash (\) before the double quote character. # #------------------------------------------------------------------------------ #if ( $1 == ) then #echo Error\!\! You must supply a path and a filter \(glob\). #echo " i.e. file_list /hamsom/dx *.dx" #exit 0 #endif # #if ( $2 == ) then #echo "Error\!\! You must supply a path and a filter \(glob\). " #echo " i.e. file_list /hamsom/dx *.dx" #exit 0 #endif set DXPATH=$1 cd $DXPATH set FILES=$2 # echo $DXPATH # echo $FILES # echo "-------------" set PATHANDFILE=$1/$2 set count=0 foreach i ($PATHANDFILE) echo object $count class string \"$i\" @ count++ end echo object \"files\" class group set count=0 foreach i ($FILES) echo member \"$i\" value $count @ count++ end echo end #echo FILES = $FILES #echo PATH AND FILES = $PATHANDFILE