I gang

FSO Delete File - ASP Classic file

have an ASP Classic using VB Script

Need to delete file using FSO - this below works fine

Set fsx=[url removed, login to view]("[url removed, login to view]")

[url removed, login to view]("C:\inetpub\wwwroot\directory\[url removed, login to view]")

BUT - I need to explore a directory and delete all files with 0 file size - so if I do this below - I get an error on [url removed, login to view] [url removed, login to view]

when it hits the first 0 size file - the error is

Microsoft VBScript runtime error '800a0035'

File not found

- How can I write this to make it delete the file?

<%

<!--

Dim fso

Dim ObjOutFile 'Creating File System Object

Set fso = CreateObject("[url removed, login to view]") 'Create an output file

GetFiles("C:\inetpub\wwwroot\[url removed, login to view]\wwwroot\fullemailfiles")

[url removed, login to view] "Completed"

Function GetFiles(FolderName)

Dim ObjFolder

Dim ObjSubFolders

Dim ObjSubFolder

Dim ObjFiles

Dim ObjFile

Set ObjFolder = [url removed, login to view](FolderName)

Set ObjFiles = [url removed, login to view] 'Write all files to output files

dim x

x = 1

For Each ObjFile In ObjFiles

x = x + 1

if x = 5000 then

[url removed, login to view]

end if

[url removed, login to view] "<br>File," & [url removed, login to view] & "," & [url removed, login to view] & " - " & [url removed, login to view]

if [url removed, login to view] = 0 then

dim fsx

Set fsx=[url removed, login to view]("[url removed, login to view]")

[url removed, login to view] [url removed, login to view]

set fsx=nothing

[url removed, login to view] "<br> Delete File s " & [url removed, login to view]

end if

Next

End Function

-->

%>

Færdigheder: ASP

Se mere: how to delete, delete, classic name, vbscript com, write script file, delete function, create vbscript, need 5000 hits, fsx, classic asp function, scripting file getfolder, need vbscript classic asp, classic asp file upload, file size, getfolder scripting, size file, getfolder, scripting filesystemobject getfolder files, read mp3 data xml file asp classic, getfolder filesystemobject, fso getfolder files, asp script filesystemobject getfolder, asp files getfolder, asp directory files, asp classic search text file

Om arbejdsgiveren:
( 397 bedømmelser ) Davenport, United States

Projekt-ID: #6053272

Tildelt til:

Attractionnet

Hello. I have the answer, it's simple for a programmer, just let me know when you want to fix the script. Regards, Marina Louki

$14 USD in 0 dage
(6 bedømmelser)
3.3

4 freelancere byder i gennemsnit $50 for dette job

Vikaskukki

Hi There, I hope you don't mind contacting to you in reference to this project posting. Undergone your requirements we're interested in working with you on this project as we've an extensive experience of working on Mere

$50 USD på 1 dag
(22 bedømmelser)
5.6
zeeshanarshad

Greetings, If you want me to consult with you and you can do the upload/run script on your server due to IP restriction so this way we can troubleshoot and fix it. I have reduced my bid to $25 (the rest is fee of this Mere

$29 USD på 1 dag
(60 bedømmelser)
5.2
Bharat8793272983

I am expert in .net but I am not expert classic asp.net but i can do this. Let me know your suggestion for it Thank you

$105 USD in 2 dage
(1 bedømmelse)
3.8