I have this vbs file that I have setup on a job to run at 2am.
DeleteFile "c:\test\*.txt"
function DeleteFile(WhatFile)
on Error Resume Next
dim fso
set fso=createobject("Scripting.Filesystemobject")
fso.DeleteFile(WhatFile)
End Function
I want to be able to set this up so I can pass the folder and file path into it.
Can someone help me out, I have tried many variations but I think I am setting the job wrong.
Thanks.
DeleteFile "c:\test\*.txt"
function DeleteFile(WhatFile)
on Error Resume Next
dim fso
set fso=createobject("Scripting.Filesystemobject")
fso.DeleteFile(WhatFile)
End Function
I want to be able to set this up so I can pass the folder and file path into it.
Can someone help me out, I have tried many variations but I think I am setting the job wrong.
Thanks.