# NNS_McsFindNextFile

## Syntax

      #include <nnsys/mcs.h>

      u32 NNS_McsFindNextFile(
              NNSMcsFile*         pFile,
              NNSMcsFileFindData* pFindData);

## Arguments

pFile | Pointer to the file information structure
pFindData | Pointer to the structure storing the information relating to the found file

## Return Values

0 if the file search succeeded. A non-zero value otherwise. The return value is one of the following:

## Description

Continues to search the PC for files that match the pattern specified by the `NNS_McsFindFirstFile` function.

The return value takes one of the following values.

`NNS_MCS_FILEIO_ERROR_SUCCESS` (0) | The function was successful.
NNS_MCS_FILEIO_ERROR_COMERROR | A communications error occurred.
NNS_MCS_FILEIO_ERROR_NOTCONNECT | Not connected to the mcs server.
NNS_MCS_FILEIO_ERROR_SERVERERROR | A error has occurred due to a file operation on the mcs server side. The error code is a Win32 system error code that can be obtained using the `NNS_McsGetServerErrorCode` function.
NNS_MCS_FILEIO_ERROR_NOMOREFILES | File that matches the pattern cannot be found.

## See Also

`NNS_McsFindFirstFile, NNS_McsCloseFind`

## Revision History

2005/01/24 Added description regarding error codes.
2004/10/19 Corrected the link to `NNS_McsCloseFind`.
2004/07/01 Initial version.

CONFIDENTIAL