Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Physcial File Delete

  Asked By: Wayne    Date: Apr 06    Category: Asp.net    Views: 954
  

In the books I have referenced, I was able to determine how to upload
files using VB.NET (i.e. renaming, placing in folders, etc.) I can
not determine how to delete a physical file. There must be some code
out there that will accomplish this goal. Can somebody please share
with me how they coded this functionality?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Rafael Thompson     Answered On: Apr 06


string path = Server.MapPath(virtualPath.ToString());

File.Delete(path);

 
Answer #2    Answered By: Helga Miller     Answered On: Apr 06

Would you possibly have the code written in VB.NET?

 
Answer #3    Answered By: Willard Washington     Answered On: Apr 06


PaTh StRing = ViRtual('& _ & char(34) & )PAthMap.SerVer

DelEte.Path.FilE

 
Didn't find what you were looking for? Find more on Physcial File Delete Or get search suggestion and latest updates.




Tagged: