Hi,
I’ve just bought a CONNECt ME developpment board.
I’m using NET+OS 7.5
I’ve created a new project including FTP SERVER.
In ftpsvr.c there is a function: int FTPServer_init()
with
status = FSInitialize(5);
status = FSInstallFileSystem(“FLASH0/”);
status = FSStartServer();
The program start perfectly and with a FTP client connected to my DIGI Connect ME I can access the the FTP server.
I can see there is a volume called FLASH0, but there is other directory and files.
I would like to add in my ftpsvr.c some code to automatically delete the files and directory on my Volume FLASH0.
Please, someone could help me ?
Best regards,
Dave
You should be able to delete files from the FLASH file system using standard “C” file access APIs. I believe yo delete files with remove. So something to the effect of remove(“FLASH0/thefileIwanttoremove.txt”);
Or as seen on a web site:
if (remove(“HELLO.txt”) == -1)
where HELLO.txt is replaced with something like I used above.
Hi Dakotas,
Thanks for your quick reply
I’ve tried your solution.
For some files it’s ok, I can remove it, but other files doesn’t work.
When it remove works, it return 0
Remove FLASH0/ERIC.bin=-1
Remove FLASH0/dest_231SA.csv=0
Remove FLASH0/ERIC10.txt=-1
Remove FLASH0/ERIC.*=-1
in my volume I’ve files and directory created through a FTP client (on my CONNECT ME) to a FTP server (my computer).
It looks like the files created through my previous FTP client can’t be deleted.
I wonder if there is some FORMAT to do…
cheers
Davide
Hi,
I’ve solved the problem.
First I’ve updated all the libraries etc … through the Digi ESP package manager.
I’ve recompiled my project changing the size of my flash file system
… Then, my volume FLASH0 was empty…
I could write and delete files directories without any problems.
I’ll do some function to do the wildcards…
Thanks