Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Simple Upload

Status
Not open for further replies.

frosty7700

Programmer
Aug 10, 2001
95
0
0
US
Has anyone here used ASP Simple Upload before? I am having a problem where it seems to be locking out access to any file that is uploaded. Basically, until I reboot, the file is read only...I cannot delete it and changing it's security doesn't work. I need to manipulate the file in my program immediately after uploading but this is preventing it.
 
Hi,

If you just wanna upload your file try this command.

path = "C:\project\enable disable barang\"

File = path & "filename.ext"
Set fs = CreateObject("Scripting.FileSystemObject")
if fs.fileExists(File) then
fs.deletefile file
end if

Set SU = Server.CreateObject("aspSmartUpload.SmartUpload")
SU.Upload
If not SU.Files.Item(1).IsMissing Then
SU.Files.Item(1).SaveAs path & "filename.ext"
End If

'* READ FILE, CHECK ERROR
File = path & "filename.ext"

Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.OpenTextFile(file, 1, False)

Thanks,

Vincent.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top