Previous: Basic ISL Tags Next: ISL Data and Displays Table of contents Images Frames Unidata's Integrated Data Viewer > Miscellaneous > IDV Scripting

7.1.2 File ISL Tags
The ISL supports a variety of file manipulation functions.
<fileset> Specify a set of files for use with other tags
<fileset
    dir="directory to look at"
    pattern="regular expression pattern to match files"
    file="the single file to select" >

The fileset tag can be used in 2 ways. The first it does not execute anything. Rather, it is used by other tags to specify a group of files that is used by some other tag.

<fileset dir="the directory to look at" pattern="file pattern to match"/>
Or:
<fileset file="somefile"/>
The second way is to iterate on a set of files. The contained isl tags are executed with the following properties set: In the example below the script iterates on all of the .nc files. The file name is printed out and then the bundle is loaded. The setfiles tag is used to set the file name within the bundle.
<isl offscreen="false">
   <fileset  pattern=".*\.nc">
     <echo message="File: ${file}"/>
     <bundle file="${islpath}/test.xidv">
<!-- This sets the data file in the bundle to the ${file} -->
	<setfiles datasource=".*" file="${file}"/>
     </bundle>
     <pause seconds="20"/>
   </fileset>
</isl>
multiplefiles.isl

<mkdir> Make a directory
<mkdir
    file="The directory to create" >

The mkdir tag creates a directory specified by the file attribute:

<mkdir  file="somedirectory"/>
There is no error if the directory already exists.
<rename> Rename a file
<rename
    from="The file to rename"
    to="The new file name" >

The rename tag allows you to rename a file:

<rename  from"somefile" to="newfile"/>

<delete> Delete a file
The delete tag deletes a set of files:
<delete>
    <fileset dir="/some/directory" pattern="*.png"/>
    <fileset name="somefile"/>
</delete>

<move> Move a file
The move tag moves a set of files to a destination directory.
<move dir="destination directory">
    <fileset dir="/some/directory" pattern="*.png"/>
    <fileset name="somefile"/>
</move>

<copy> Copy a file
The copy tag copies a set of files to a destination directory.
<copy dir="destination directory">
    <fileset dir="/some/directory" pattern="*.png"/>
    <fileset name="somefile"/>
</copy>

 


Previous: Basic ISL Tags Next: ISL Data and Displays Table of contents Images Frames Unidata's Integrated Data Viewer > Miscellaneous > IDV Scripting