Check the size of a file in SD card

Hi

I want to send a file (file.txt) from SD card to FTP server by MC60 module. Before sending, I need to check the size of the file. that’s way, I trying as below:

#define FTP_FILENAME_UL “file.txt\0”
fileSize=Ql_FS_GetSize((8*)FTP_FILENAME_UL);

But, when I checked the log of module by Q Navigator tools, the code faced to “error -35” in the check size file!

Plz help me to fix this issue
Tnx a lot

Hi,“error -35” means that fail to operate file,please check if you have this file on your SD card. The AT+QFLST command may help you.
image
In the figure "& lt; – Ql_FS_GetSize() = 0 "This reply is an example I wrote from your program. “file.text” is the empty file I created,so i think the function itself is fine.
image
image

If you can find the file using the AT command and use the function to read the file size, you should be able to do it