以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  文件管理器删除不掉文件,请老师看看  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=95503)

--  作者:MarkHong
--  发布时间:2017/1/22 8:57:00
--  文件管理器删除不掉文件,请老师看看
Dim nj As String = e.Form.Controls("ComboBox2").text
Dim sxc As String = e.Form.Controls("ComboBox1").text
Dim pth As String = ProjectPath & "Attachments\\语文\\" & nj & sxc & "\\"
Dim fm As WinForm.FileManager = e.Form.Controls("FileManager2")
Dim fl As String = fm.SelectedItem
If fl > "" Then
    fm.DeleteFile(fl)
    MessageBox.show(pth & fl)
    fm.DeleteFile(pth & fl)
End If

可以删除文件管理器的,但文件夹中的文件删除不掉,那位老师有空看看

--  作者:MarkHong
--  发布时间:2017/1/22 9:07:00
--  
好了,用了点粗暴的方法

FileSys.DeleteFile

--  作者:有点色
--  发布时间:2017/1/22 10:23:00
--  
 属性那里,你只需要把【自动删除附件】设置成true即可。