<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=FILES</id>
	<title>FILES - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=FILES"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=FILES&amp;action=history"/>
	<updated>2026-04-14T16:55:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=FILES&amp;diff=700&amp;oldid=prev</id>
		<title>ConvertBot: lists files in the specified auxiliaries using a MORE filter and columns</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=FILES&amp;diff=700&amp;oldid=prev"/>
		<updated>2020-04-27T22:04:31Z</updated>

		<summary type="html">&lt;p&gt;lists files in the specified auxiliaries using a MORE filter and columns&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;lists files in the specified auxiliaries using a MORE filter and columns&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;name&amp;gt; Full or partial file name of interest&lt;br /&gt;
&amp;lt;ext&amp;gt;  Filename extension of interest (defaults to TMP|PRM|TXT)&lt;br /&gt;
&amp;lt;aux&amp;gt;  Auxiliary of interest (or path in quotes)&lt;br /&gt;
&amp;lt;uid&amp;gt;  User ID for the area of interest (not implemented)&lt;br /&gt;
&lt;br /&gt;
FILES uses operating system library calls to retrieve a list of wildcarded&lt;br /&gt;
files following the Midas auxiliary structure.  The output is pushed through&lt;br /&gt;
the MORE filter and is listed in columns to show more files in one screen.&lt;br /&gt;
&lt;br /&gt;
Both &amp;lt;name&amp;gt; and &amp;lt;ext&amp;gt; can contain multiple expressions to match separated&lt;br /&gt;
by the | character.  For example:&lt;br /&gt;
&lt;br /&gt;
  FILES a*|b*|c* txt|key&lt;br /&gt;
&lt;br /&gt;
would list all files beginning with a, b, or c having the extension .txt or&lt;br /&gt;
.key, the extension can also contain wildcards (i.e. txt|k* would match .txt&lt;br /&gt;
or any extension beginning with k..&lt;br /&gt;
&lt;br /&gt;
A full path name can be given in the &amp;lt;name&amp;gt; argument and the auxiliaries&lt;br /&gt;
will be bypassed completely.  However, if a path name is given, you are&lt;br /&gt;
limited to specifying only one &amp;lt;name&amp;gt; expression to match (i.e. you&lt;br /&gt;
cannot use the '|' for the file name pattern match.)&lt;br /&gt;
&lt;br /&gt;
The path can also be entered in the &amp;lt;aux&amp;gt; field to bypass the aux table.&lt;br /&gt;
The path string must end in a path delimiter and be entered in quotes.&lt;br /&gt;
&lt;br /&gt;
The /F switch specifies a Midas file to receive the output of the command.&lt;br /&gt;
/F=FILENAME will use FILENAME.TMP; /F alone uses FILES.TMP . This file can be&lt;br /&gt;
used with the FORALL command to ERASE, SAVE or CONVERT, etc. a group of files.&lt;br /&gt;
If the /F switch is present, one can not use the /E switch to erase.&lt;br /&gt;
&lt;br /&gt;
Since NeXtMidas 2.7.2: The /LIST= switch specifies a result name to receive the&lt;br /&gt;
output of the command as a comma-separated string list of file names/paths.&lt;br /&gt;
&lt;br /&gt;
Since NeXtMidas 2.9.0, it is possible to specify multiple extensions in the&lt;br /&gt;
NAME=. Furthermore, if using the /STRICT switch, these extensions will only&lt;br /&gt;
apply to the name given with them. For example:&lt;br /&gt;
&lt;br /&gt;
  nM&amp;gt; files/strict name=S*.jpg|*v2.prm  aux=dat&lt;br /&gt;
&lt;br /&gt;
will list ONLY those files in the DAT aux that are .jpg files that start with&lt;br /&gt;
's' or .prm files that end with 'v2'. The default behaviour when not using&lt;br /&gt;
/STRICT is to combine the filters, so in the above example any file that&lt;br /&gt;
started with an 'S' or ended with 'v2' that was EITHER a jpg or prm would get&lt;br /&gt;
returned.  Note that defining extensions using EXT= will override the new&lt;br /&gt;
behaviour.&lt;br /&gt;
&lt;br /&gt;
Since NeXtMidas 3.1.0, it is possible to exclude certain AUXs from being&lt;br /&gt;
searched when the files command is used to find files that match a given&lt;br /&gt;
filter. This can be done in two ways: using the system environment variable&lt;br /&gt;
NM_COMPLETION_AUX_EXCLUDE=&amp;lt;auxlist&amp;gt; or the switch /EXCLUDE=&amp;lt;auxlist&amp;gt;. In&lt;br /&gt;
each case, &amp;lt;auxlist&amp;gt; is a list of pipe ('|') separated AUXs to be skipped.&lt;br /&gt;
Note: if NM_COMPLETION_AUX_EXCLUDE is set AND the /EXCLUDE switch is used,&lt;br /&gt;
the /EXCLUDE switch will override.&lt;br /&gt;
&lt;br /&gt;
NOTE:&lt;br /&gt;
  If multiple AUX's point to the same disk location (e.g. AUX[1] and AUX[CWD]&lt;br /&gt;
  are the same) then FILES will only list one of them.&lt;br /&gt;
&lt;br /&gt;
NOTE:&lt;br /&gt;
  Directories can be listed by using the special extension &amp;quot;dir&amp;quot;.&lt;br /&gt;
  When specifying a directory, it must end with a path delimiter.&lt;br /&gt;
  A non-AUX path can be entered directly in the &amp;lt;AUX&amp;gt; parameter slot in quotes.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  1. To list the headers of all files beginning with &amp;quot;tes&amp;quot;&lt;br /&gt;
      nM&amp;gt; files/h tes*&lt;br /&gt;
&lt;br /&gt;
  2. To erase all files with &amp;quot;temp&amp;quot; in the filename&lt;br /&gt;
      nM&amp;gt; files/f *temp*&lt;br /&gt;
      nM&amp;gt; forall files erase #&lt;br /&gt;
    or&lt;br /&gt;
      nM&amp;gt; files/e *temp*&lt;br /&gt;
&lt;br /&gt;
  3. List all the files in AUX=1 and show their sizes&lt;br /&gt;
      nM&amp;gt; files/h AUX=1&lt;br /&gt;
&lt;br /&gt;
  4. List all of the files starting with world and having a .shp extension&lt;br /&gt;
      nM&amp;gt; files world*.shp&lt;br /&gt;
&lt;br /&gt;
  5. List each TXT file in a directory and then do something with it&lt;br /&gt;
&lt;br /&gt;
      files/list=files/nameonly &amp;quot;^{mydir}&amp;quot; ext=txt&lt;br /&gt;
      foreach name inlist files&lt;br /&gt;
        say &amp;quot;Found TXT file ^name in ^mydir&amp;quot;&lt;br /&gt;
      endfor&lt;br /&gt;
  6. List all the files in AUX=DAT that are .jpg files starting with an 's' or&lt;br /&gt;
     .prm files that end with 'v2'&lt;br /&gt;
       nM&amp;gt; files/strict name=S*.jpg|*v2.prm  aux=dat&lt;br /&gt;
&lt;br /&gt;
  7. List only the directories (no files) under the current working directory&lt;br /&gt;
      nM&amp;gt; files ext=&amp;quot;dir&amp;quot; aux=aux.cwd&lt;br /&gt;
&lt;br /&gt;
  8. List only the directories (no files) under the /midas/data1/ directory&lt;br /&gt;
      nM&amp;gt; files ext=&amp;quot;dir&amp;quot; aux=/midas/data1/&lt;br /&gt;
&lt;br /&gt;
  9. List all of the files starting with world and having a .shp extension,&lt;br /&gt;
     but skip (exclude) any files in the current working directory&lt;br /&gt;
      nM&amp;gt; files/exclude=cwd world*.shp&lt;br /&gt;
&lt;br /&gt;
Switches:&lt;br /&gt;
  /E            - Erase the files specified. Can not be used with /F switch.&lt;br /&gt;
  /EXCLUDE=&amp;lt;AUX&amp;gt;- List of pipe ('|') separated AUXs to be excluded when looking&lt;br /&gt;
                  for files that match a filter (since 3.1.0).&lt;br /&gt;
                  Note: This will override any AUXs listed in the environment&lt;br /&gt;
                  setting NM_COMPLETION_AUX_EXCLUDE.&lt;br /&gt;
  /F=&amp;lt;filename&amp;gt; - Specifies a filename to receive output, if blank outputs&lt;br /&gt;
                  to FILES.TMP&lt;br /&gt;
                  If the filename has a .txt extension, then the output file&lt;br /&gt;
                  will be a text file with items (entries) separated by a&lt;br /&gt;
                  newline (LF char) versus a BLUE file (since 3.1.1).&lt;br /&gt;
  /FORM=&amp;lt;form&amp;gt;  - Format of type 1000 file specified by /F=. [DEF=XA]&lt;br /&gt;
  /H            - Creates a column-based table with file type, data format,&lt;br /&gt;
                  and number of elements for each file (this is similar to&lt;br /&gt;
                  &amp;quot;ls -l&amp;quot; in Unix).&lt;br /&gt;
  /LIST=&amp;lt;res&amp;gt;   - Outputs the file listing to the named result. The format will&lt;br /&gt;
                  be a comma-separated string including each item found. If&lt;br /&gt;
                  nothing is found, an empty string will be output (since 2.7.2)&lt;br /&gt;
  /NAMEONLY     - When used with /F= or /LIST= causes only the name of the file&lt;br /&gt;
                  to be output rather than the full file path. [DFE=FALSE]&lt;br /&gt;
                  (Since NeXtMidas 2.7.2)&lt;br /&gt;
  /R=           - Recursive directory list when &amp;lt;aux&amp;gt; is a path. [DEF=NONE]&lt;br /&gt;
                  The modes are:&lt;br /&gt;
                    NONE - No recursion&lt;br /&gt;
                    FULL - To end of each directory path&lt;br /&gt;
                    LEVELFIND - To the level of found file, no deeper&lt;br /&gt;
                    FIRSTFIND - To the first found file, then return&lt;br /&gt;
  /STRICT       - In conjunction with NAME=[], use extension listed with the&lt;br /&gt;
                  particular filename only (ignores EXT=[]) (since 2.9.0).&lt;br /&gt;
  /V            - Successively lists the headers of each DataFile (other files&lt;br /&gt;
                  will be skipped over). This switch overrides and disables /H.&lt;br /&gt;
&lt;br /&gt;
SEE ALSO:  FORALL, FOREACH&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:NXM_Explain]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>