Delete files in PDA

hi,
How I can  delete a file with Kill("fileName") function in compact firmware application for WM5.0 PDA?
thanks
DODOAsked:
Who is Participating?
 
Jaime OlivaresConnect With a Mentor Software ArchitectCommented:
>>System.IO.File.Delete("\Storage Card\Tepm\YourFile.txt")

that depends on programming language. In C# it would be:
System.IO.File.Delete(@"\Storage Card\Temp\YourFile.txt");
or
System.IO.File.Delete("\\Storage Card\\Temp\\YourFile.txt");

also there is a typo in Tepm folder ;)
0
 
Jaime OlivaresSoftware ArchitectCommented:
Where is your file located?
You can use System.IO.File.Delete()
0
 
DODOAuthor Commented:
hi,
file location in storage card of the PDA as /SDMMC
ALREADY I TRIED My.Computer.FileSystem.DeleteFile but not accepted in compact dot net 2.0 firmwork
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Jaime OlivaresSoftware ArchitectCommented:
maybe you are not providing the correct file path.
0
 
DODOAuthor Commented:
Its not path problem , i got error in code when i am using it if the target machine is WM5.0 and the same code accepted if the target machine is PC .
So I  think some missing import names i must use or we can't use the same thing under compact dot net
frimwork.
0
 
Mikal613Commented:
System.IO.File.Delete("\Storage Card\Tepm\YourFile.txt")
0
 
DODOAuthor Commented:
Thanks to Mr . jaime & Mr. Mikal
My mistake that I was using :   My.Computer.FileSystem.DeleteFile()    instead of  
System.IO.File.Delete("\Storage Card\Tepm\YourFile.txt")
Best regards
dodo
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.