Scripter25
asked on
Regular Expression For uploading Doc, RTF, and Txt files
I have an upload form that needs to upload resumes. I only want to accept the following file types.
rtf, doc, txt and if possible provide a seperate error if the member trys to upload a .docx file.
The docx file is due to MS new Word 2007 I know not too many people have it now but by time I get this site completed it will be more prominate.
So anyhow the overall question is what would the regularexpression be for this?
rtf, doc, txt and if possible provide a seperate error if the member trys to upload a .docx file.
The docx file is due to MS new Word 2007 I know not too many people have it now but by time I get this site completed it will be more prominate.
So anyhow the overall question is what would the regularexpression be for this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Imports System.IO
...
Dim fileName As String = Environment.GetFolderPath(
Dim info As New FileInfo(fileName)
Dim ext As String = info.Extension.ToLower()
If ext = "doc" OrElse ext = "rtf" OrElse ext = "txt" Then
End If
Bob