<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ccarh.org/index.php?action=history&amp;feed=atom&amp;title=Zbex_directory_handling</id>
	<title>Zbex directory handling - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ccarh.org/index.php?action=history&amp;feed=atom&amp;title=Zbex_directory_handling"/>
	<link rel="alternate" type="text/html" href="https://wiki.ccarh.org/index.php?title=Zbex_directory_handling&amp;action=history"/>
	<updated>2026-04-30T08:12:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.ccarh.org/index.php?title=Zbex_directory_handling&amp;diff=794&amp;oldid=prev</id>
		<title>Craig: added chapter navigator at top and bottom of page</title>
		<link rel="alternate" type="text/html" href="https://wiki.ccarh.org/index.php?title=Zbex_directory_handling&amp;diff=794&amp;oldid=prev"/>
		<updated>2010-10-20T05:17:16Z</updated>

		<summary type="html">&lt;p&gt;added chapter navigator at top and bottom of page&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:17, 20 October 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;__TOC__&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{ZbexChap&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   | before =  [[Zbex tables|Tables]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   | after = [[Zbex special variables and labels|Special variables and labels]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;center&amp;gt;&lt;/ins&gt;__TOC__&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/center&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Zbex gives you two commands which relate to directories: &amp;lt;tt&amp;gt;getdir&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;createdir&amp;lt;/tt&amp;gt;.  In addition, you can read the contents of a directory by opening it as a file.   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Zbex gives you two commands which relate to directories: &amp;lt;tt&amp;gt;getdir&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;createdir&amp;lt;/tt&amp;gt;.  In addition, you can read the contents of a directory by opening it as a file.   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l88&quot;&gt;Line 88:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 92:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          C:\RELEASE\INTERNET/rivet created  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          C:\RELEASE\INTERNET/rivet created  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          Ready for program&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          Ready for program&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{ZbexChap&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   | before =  [[Zbex tables|Tables]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;   | after = [[Zbex special variables and labels|Special variables and labels]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Craig</name></author>
	</entry>
	<entry>
		<id>https://wiki.ccarh.org/index.php?title=Zbex_directory_handling&amp;diff=554&amp;oldid=prev</id>
		<title>Craig: created page</title>
		<link rel="alternate" type="text/html" href="https://wiki.ccarh.org/index.php?title=Zbex_directory_handling&amp;diff=554&amp;oldid=prev"/>
		<updated>2010-10-14T14:35:26Z</updated>

		<summary type="html">&lt;p&gt;created page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
Zbex gives you two commands which relate to directories: &amp;lt;tt&amp;gt;getdir&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;createdir&amp;lt;/tt&amp;gt;.  In addition, you can read the contents of a directory by opening it as a file.  &lt;br /&gt;
&lt;br /&gt;
== getdir == &lt;br /&gt;
&lt;br /&gt;
The getdir statement will provide you with the path of the current directory.  There is no way with Zbex to change the current directory.  The following example will open the current directory, read its contents, and display them on the screen.  &lt;br /&gt;
&lt;br /&gt;
               Program &lt;br /&gt;
         --------------------- &lt;br /&gt;
         str curdir.80,rec.80 &lt;br /&gt;
    &lt;br /&gt;
         getdir curdir &lt;br /&gt;
         open [1,1] curdir &lt;br /&gt;
         loop &lt;br /&gt;
           getf [1] rec &lt;br /&gt;
           putc ~rec &lt;br /&gt;
         repeat &lt;br /&gt;
         run &lt;br /&gt;
&lt;br /&gt;
                      Execution &lt;br /&gt;
         ------------------------------------- &lt;br /&gt;
         ** S=8, P=25, L=239, M=452 ** &lt;br /&gt;
         DISP         &amp;lt;DIR&amp;gt;     7-18-95 10:12p &lt;br /&gt;
         FORMATS      &amp;lt;DIR&amp;gt;     8-10-95 11:01p &lt;br /&gt;
         MKSLURS      &amp;lt;DIR&amp;gt;    11-01-95 10:08p &lt;br /&gt;
         SPECS        &amp;lt;DIR&amp;gt;     7-18-95 10:11p &lt;br /&gt;
         COMPRESS OLD    59427  7-05-95  3:12p &lt;br /&gt;
         DECOMP   OLD    26037  7-05-95  3:12p &lt;br /&gt;
         BUG      Z        197  7-05-95  3:12p &lt;br /&gt;
         EXPAND   Z      28179 10-08-95 12:18a &lt;br /&gt;
         MAKECFT  Z      66767 10-09-95  7:22a &lt;br /&gt;
                9 Files(s) &lt;br /&gt;
         Ready for program &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== createdir ==&lt;br /&gt;
&lt;br /&gt;
The createdir statement lets you create a new directory.  The path to the new directory must already exist (you can create it, one sub-directory at a time).  Zbex does not provide you with a means of removing directories (or removing files, either).  The following example will create a new directory in the current directory.  &lt;br /&gt;
 &lt;br /&gt;
               Program &lt;br /&gt;
         --------------------- &lt;br /&gt;
            str newdir.80,curdir.80 &lt;br /&gt;
            str rec.80,temp.80 &lt;br /&gt;
      &lt;br /&gt;
            getdir curdir &lt;br /&gt;
         B: &lt;br /&gt;
            putc Name of new directory?  &lt;br /&gt;
            getc newdir &lt;br /&gt;
            temp = ucs(newdir)     /* for comparing with current names &lt;br /&gt;
      &lt;br /&gt;
            Make sure that this directory doesn&amp;#039;t already exist &lt;br /&gt;
      &lt;br /&gt;
            open [1,1] curdir &lt;br /&gt;
            loop &lt;br /&gt;
              getf [1] rec &lt;br /&gt;
              if rec{1} = &amp;quot; &amp;quot;      /* no more entries in directory &lt;br /&gt;
                goto A &lt;br /&gt;
              end &lt;br /&gt;
              if rec{18} = &amp;quot;&amp;gt;&amp;quot;     /* looking for sub-directories &lt;br /&gt;
                if rec con &amp;quot; &amp;quot; &lt;br /&gt;
                  rec = rec{1,mpt-1}   /* keep only the name &lt;br /&gt;
                end &lt;br /&gt;
                if rec = temp &lt;br /&gt;
                  putc This directory already exists &lt;br /&gt;
                  close [1]        /* must close [1] so we can open it an &lt;br /&gt;
                  goto B &lt;br /&gt;
                end &lt;br /&gt;
              end &lt;br /&gt;
            repeat &lt;br /&gt;
         A: &lt;br /&gt;
            close [1] &lt;br /&gt;
      &lt;br /&gt;
            Directory doesn&amp;#039;t exist; try to create it.  &lt;br /&gt;
      &lt;br /&gt;
            newdir = curdir // &amp;quot;/&amp;quot; // newdir &lt;br /&gt;
            createdir newdir &lt;br /&gt;
            putc ~newdir  created &lt;br /&gt;
            run &lt;br /&gt;
&lt;br /&gt;
                      Execution &lt;br /&gt;
         ------------------------------------- &lt;br /&gt;
         Name of new directory?  &lt;br /&gt;
         specs &lt;br /&gt;
         This directory already exists &lt;br /&gt;
         Name of new directory?  &lt;br /&gt;
         rivet &lt;br /&gt;
         C:\RELEASE\INTERNET/rivet created &lt;br /&gt;
         Ready for program&lt;/div&gt;</summary>
		<author><name>Craig</name></author>
	</entry>
</feed>