<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wikiti.brandonw.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wikiti.brandonw.net/index.php?action=history&amp;feed=atom&amp;title=83Plus%3ASoftware%3Ausb8x%2FAsm_Interface%2FMSD%2FFAT_findFileInCluster</id>
		<title>83Plus:Software:usb8x/Asm Interface/MSD/FAT findFileInCluster - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wikiti.brandonw.net/index.php?action=history&amp;feed=atom&amp;title=83Plus%3ASoftware%3Ausb8x%2FAsm_Interface%2FMSD%2FFAT_findFileInCluster"/>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Software:usb8x/Asm_Interface/MSD/FAT_findFileInCluster&amp;action=history"/>
		<updated>2026-04-06T13:14:45Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.5</generator>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:Software:usb8x/Asm_Interface/MSD/FAT_findFileInCluster&amp;diff=5088&amp;oldid=prev</id>
		<title>Brandonw at 19:22, 17 August 2006</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Software:usb8x/Asm_Interface/MSD/FAT_findFileInCluster&amp;diff=5088&amp;oldid=prev"/>
				<updated>2006-08-17T19:22:37Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Synopsis ==&lt;br /&gt;
'''Name:''' FAT_findFileInCluster&lt;br /&gt;
&lt;br /&gt;
'''Minimum usb8x version:''' 0.10&lt;br /&gt;
&lt;br /&gt;
Gets directory entry for a file/folder in specified directory.&lt;br /&gt;
&lt;br /&gt;
=== Inputs ===&lt;br /&gt;
* HL is the starting cluster of the directory to search in (obtained with [[../FAT_getStartingCluster|FAT_getStartingCluster]])&lt;br /&gt;
* DE points to the name of a file/directory, 11-character format (obtained with [[../FAT_nameConvertTo11|FAT_nameConvertTo11]] if necessary)&lt;br /&gt;
&lt;br /&gt;
=== Outputs ===&lt;br /&gt;
* HL points to the directory entry for the found file/folder&lt;br /&gt;
* C set if not found&lt;br /&gt;
&lt;br /&gt;
=== Destroys ===&lt;br /&gt;
* AF, BC, DE, HL&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
This works with both file and folder names and is a lower-level way of searching for a file/folder in a directory. It is less likely to be used than [[../FAT_lookupPath|FAT_lookupPath]] or [[../DOS_getDirEntry|DOS_getDirEntry]].&lt;br /&gt;
Example code to find &amp;quot;test.txt&amp;quot; in the root directory:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ld hl,0000h ;0000h is always starting cluster for root directory&lt;br /&gt;
 ld de,sFilename&lt;br /&gt;
 U_CALL FAT_findFileInCluster&lt;br /&gt;
 ...&lt;br /&gt;
 sFilename: DB &amp;quot;TEST    TXT&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If you are writing an application, you must copy the strings you use to RAM first, or else usb8x will not be able to see them.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[../FAT_lookupPath|FAT_lookupPath]] - Find whether specified file/directory exists&lt;br /&gt;
* [[../DOS_getDirEntry|DOS_getDirEntry]] - Get directory entry for file/folder in specified directory&lt;/div&gt;</summary>
		<author><name>Brandonw</name></author>	</entry>

	</feed>