Download FreeRTOS

Quality RTOS & Embedded Software

Achieving Unbrickable MCU FOTA for your FreeRTOS-powered Firmware:
FreeRTOS 202012 LTS end of support announced.
FreeRTOS website now available in Simplified Chinese
New FreeRTOS Long Term Support version now available.
FreeRTOS Extended Maintenance Program (EMP) registration now open.


[FreeRTOS Embedded File System API]

unsigned char f_findnext( F_FIND *pxFindStruct );

Finds the next file or directory within a FAT file system directory. Call f_findfirst() to find the first file or directory, then f_findnext() to find subsequent files and directories - the same instance of the F_FIND object must be used with both the findfirst and findnext functions.


pxFindStruct   A structure in which the 'find' information is stored. The structure must be completed by a successful call to f_findfirst() before it can be passed to f_findnext().

F_NO_ERROR   The call to f_findnext() was successful and pxFindStruct was populated.

Any other value   The call to f_findnext() was not successful. The return value holds the error code.

See also


Example usage:

void vAFunction( void )
F_FIND xFindStruct;

/* Print out information on every file in the subdirectory "subdir". */
if( f_findnext( "/subdir/*.*", &xFindStruct ) == F_NO_ERROR )
printf( filename:%s, xFindStruct.filename );

if( ( xFindStruct.attr & F_ATTR_DIR ) != 0 )
printf ( "is a directory directoryrn" );
printf ( "is a file of size %drn", xFindStruct.filesize );

} while( f_findnext( &xFindStruct ) == F_NO_ERROR );

Example use of the f_findnext() API function

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.