Hi there,
I have a question regarding file delete, for this I use the File.Delete() commend . as a parameter for this I send the file path. Which is
“C:\\Documents and Settings\\awaduge\\My Documents\\Visual Studio 2008\\Projects\\Admin Application\\Admin Application\\Details\\P110082010112121\\Report\\Technical Sheet"
And Technical Sheet is the file name. the file can be in txt,execl, pdf any format.
How can I delete the file Technical Sheet in the folder Report.
When I add the command File.Delete() with the path as above, nothing happens
thanxxxxxx
judithSampathwa
-2
Posting Pro in Training
Recommended Answers
Jump to PostGenerally you should be getting either a result of the file being deleted (assuming your directories are correct), an exception (in the event that your path is incorrect) or, in the event that the file does not exist, no exception is thrown.
Jump to Postmsdn.microsoft.com indicates that the path needs to include: "The name of the file to be deleted. Wildcard characters are not supported."
Of course, if you'd read the link I posted instead of …
All 5 Replies
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
judithSampathwa
-2
Posting Pro in Training
nssltd
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
nssltd
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.