Create file names with the terminal ID and time stamp added. Used when sending and renaming files.

Syntax

int FTP_CreateRemoteFilename(
  int filenameType,
  const char *filename,
  char *remoteName,
  char *tempName,
);

Parameters

filenameType
[in] Specify whether to add a time stamp or terminal ID to the file name with the following values.
filenameType Description
FTP_NAME_NOTIME_NOID Generates a file name with no time stamp and no terminal ID.
(FILENAME.EXT)
FTP_NAME_TIME_NOID Generates a filename with a time stamp and no terminal ID.
(FILENAME_YYYYMMDDhhmmss.EXT)
FTP_NAME_NOTIME_ID Generates a file name without a time stamp and with a terminal ID.
(FILENAME_####.EXT)
FTP_NAME_TIME_ID Generates a file name with a time stamp and a terminal ID.
(FILENAME_####_YYYYMMDDhhmmss.EXT)
FILENAME: File name of the base file.
EXT: Extension of the base file.
YYYYMMDDhhmmss: Year, month, day, hour, minute, second (Example: 20210514093045)
####: terminal ID (Example: 0001)
filename
[in] Specify the base file name.
remoteName
[out] Specifies the buffer that stores the remote file name.
tempName
[out] Specifies the buffer that stores the temporary remote file name. Returns the file name with ".temp" added to remoteName.

Return value

Returns M2M_SUCCESS if the function succeeds, otherwise it returns any other value.

Remarks

To connect to the FTP server, call the FTP_Connect function.

To send a command to the FTP server, call the FTP_Command function.

Be sure to call the FTP_Finish function after using the FTP client.

Requirements

Header file:
lib.h
FTP.h
Library file:
libFTP.a
libSTARTUPOPH5000.a


Last updated: 2021/06/03