<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[esxDOS BBS — Request for a DOT-Command to report if file or directory exist]]></title>
	<link rel="self" href="https://board.esxdos.org/extern.php?action=feed&amp;tid=1067&amp;type=atom" />
	<updated>2024-09-30T16:21:08Z</updated>
	<generator>PunBB</generator>
	<id>https://board.esxdos.org/viewtopic.php?id=1067</id>
		<entry>
			<title type="html"><![CDATA[Re: Request for a DOT-Command to report if file or directory exist]]></title>
			<link rel="alternate" href="https://board.esxdos.org/viewtopic.php?pid=2244#p2244" />
			<content type="html"><![CDATA[<p>CHDir not a valid Next dot command or direct command</p><p>This will work though</p><p>5 Folder$=&quot;games\mygear&quot;<br />10 r$=&quot;Directory found&quot;<br />20 on error r$=&quot;Not found&quot;: goto %50<br />40 CD Folder$<br />50 Print r$: on error</p><p>If you wish to confirm if a file exists I found the best method is using the dot command .filesize<br />.filesize myfile</p><p>This puts the file size in variable T.&nbsp; If no file existing T=0<br />This command isn&#039;t in the distro you have to add it to the dot directory to use</p>]]></content>
			<author>
				<name><![CDATA[SZERMAN]]></name>
				<uri>https://board.esxdos.org/profile.php?id=1314</uri>
			</author>
			<updated>2024-09-30T16:21:08Z</updated>
			<id>https://board.esxdos.org/viewtopic.php?pid=2244#p2244</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Request for a DOT-Command to report if file or directory exist]]></title>
			<link rel="alternate" href="https://board.esxdos.org/viewtopic.php?pid=2229#p2229" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Luzie wrote:</cite><blockquote><div class="quotebox"><cite>aowen wrote:</cite><blockquote><p>I&#039;m fairly sure Garry&#039;s version of 128 BASIC has some kind of error handling equivalent to ON ERROR that you could use for that purpose.</p></blockquote></div><p>Thank you. Someone tells me a way in NextBASIC (using ON ERROR) to check for existance of a file or directory.</p></blockquote></div><p>Sorry no-one has got back to you on this. Here&#039;s how I&#039;d do it in SE Basic IV.</p><div class="codebox"><pre><code>10 EXISTS = 1
20 FOLDER$ = &quot;FOLDER&quot;
30 ON ERROR GOSUB 100
40 CHDIR FOLDER$
50 IF EXISTS = 1 THEN PRINT &quot;Folder exists&quot;: ELSE PRINT &quot;Folder does not exist&quot;
60 END
100 ON ERROR STOP
110 EXISTS = 0
120 RETURN</code></pre></div>]]></content>
			<author>
				<name><![CDATA[aowen]]></name>
				<uri>https://board.esxdos.org/profile.php?id=168</uri>
			</author>
			<updated>2023-07-24T16:54:33Z</updated>
			<id>https://board.esxdos.org/viewtopic.php?pid=2229#p2229</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Request for a DOT-Command to report if file or directory exist]]></title>
			<link rel="alternate" href="https://board.esxdos.org/viewtopic.php?pid=2227#p2227" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>aowen wrote:</cite><blockquote><p>I&#039;m fairly sure Garry&#039;s version of 128 BASIC has some kind of error handling equivalent to ON ERROR that you could use for that purpose.</p></blockquote></div><p>Thank you. Someone tells me a way in NextBASIC (using ON ERROR) to check for existance of a file or directory.</p>]]></content>
			<author>
				<name><![CDATA[Luzie]]></name>
				<uri>https://board.esxdos.org/profile.php?id=157</uri>
			</author>
			<updated>2023-07-06T15:34:30Z</updated>
			<id>https://board.esxdos.org/viewtopic.php?pid=2227#p2227</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Request for a DOT-Command to report if file or directory exist]]></title>
			<link rel="alternate" href="https://board.esxdos.org/viewtopic.php?pid=2224#p2224" />
			<content type="html"><![CDATA[<p>I&#039;m fairly sure Garry&#039;s version of 128 BASIC has some kind of error handling equivalent to ON ERROR that you could use for that purpose.</p>]]></content>
			<author>
				<name><![CDATA[aowen]]></name>
				<uri>https://board.esxdos.org/profile.php?id=168</uri>
			</author>
			<updated>2023-07-04T17:03:15Z</updated>
			<id>https://board.esxdos.org/viewtopic.php?pid=2224#p2224</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Request for a DOT-Command to report if file or directory exist]]></title>
			<link rel="alternate" href="https://board.esxdos.org/viewtopic.php?pid=2223#p2223" />
			<content type="html"><![CDATA[<p>Here´s my request for a DOT-Command e.g. called &quot;.ifexist&quot; to report if file or directory exists.</p><p>I need it under NextBASIC, and there´s no BASIC built-in command for doing this query from NextBASIC yet.</p><p>Thank you!</p>]]></content>
			<author>
				<name><![CDATA[Luzie]]></name>
				<uri>https://board.esxdos.org/profile.php?id=157</uri>
			</author>
			<updated>2023-04-13T15:52:47Z</updated>
			<id>https://board.esxdos.org/viewtopic.php?pid=2223#p2223</id>
		</entry>
</feed>
