# File System connectme

**URL:** <https://forums.digi.com/t/file-system-connectme/4283>\
**Category:** NET+OS\
**Tags:** filesystem, flash\
**Created:** [January 5, 2011, 9:11pm UTC](https://forums.digi.com/t/file-system-connectme/4283 "2011-01-05T21:11:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgcmorelli](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@dgcmorelli](https://forums.digi.com/u/dgcmorelli)\
**Post date:** [January 5, 2011, 9:11pm UTC](https://forums.digi.com/t/file-system-connectme/4283/1 "2011-01-05T21:11:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dakotas\_dad](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dakotas\_dad](https://forums.digi.com/u/dakotas_dad)\
**Post date:** [January 5, 2011, 9:24pm UTC](https://forums.digi.com/t/file-system-connectme/4283/2 "2011-01-05T21:24:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dgcmorelli](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@dgcmorelli](https://forums.digi.com/u/dgcmorelli)\
**Post date:** [January 5, 2011, 9:42pm UTC](https://forums.digi.com/t/file-system-connectme/4283/3 "2011-01-05T21:42:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![egawtry](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@egawtry](https://forums.digi.com/u/egawtry)\
**Post date:** [January 6, 2011, 3:17pm UTC](https://forums.digi.com/t/file-system-connectme/4283/4 "2011-01-06T15:17:13Z")

</div>

1. Dakota’s Dad, remove() is not standard C - unlink() is, but a rose by any other name…
2. DGC Morelli, wildcards do not work. You need to do your own globbing.
3. Check for case. Files are case sensitive on NetOS.
4. Format is not a standard C command. There is a NetOS call to wipe the drive, I don’t recall it at the moment, but since this is a development ME with JTAG (I assume), you can just tell it to wipe it when you start the debugger.

-Erik

---

<div class="post-metadata">

**Author:** ![dgcmorelli](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@dgcmorelli](https://forums.digi.com/u/dgcmorelli)\
**Post date:** [January 6, 2011, 5:50pm UTC](https://forums.digi.com/t/file-system-connectme/4283/5 "2011-01-06T17:50:48Z")

</div>

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
