|
 |
asp_web_howto thread: wsc
Message #1 by "Pham, Khanh" <Khanh.Pham@d...> on Mon, 17 Sep 2001 13:54:02 -0400
|
|
I'm trying to create a wsc file to automatically delete files once a week
using the window script component wizard and added my coded. I schdeduled
it in the MS Schedule task to test it. The only thing it does when the time
comes is bring up the code in notepad. I think it could be my script.
<?xml version="1.0"?>
<component>
<registration
description="deleteFile"
progid="deleteFile.WSC"
version="1.00"
classid="{ae9c2bf3-0489-434f-8c94-fc51b3a1ac7c}"
>
</registration>
<public>
</public>
<implements type="ASP" id="ASP"/>
<script language="VBScript">
<![CDATA[
Dim oFSO, strcsvFolderPath
strcsvFolderPath = "d:\inetpub\wwwroot\temp\"
set oFSO = Server.CreateObject("Scripting.FileSystemObject")
oFSO.DeleteFile (strcsvFolderPath & "*.*")
set oFSO = nothing
]]>
</script>
</component>
Any help is appreciated.
khanh
Message #2 by "phil griffiths" <pgtips@m...> on Tue, 18 Sep 2001 10:29:22
|
|
It sounds like what you really want is a VBScript file to run under
Windows Script Host. As I understand it, WSC files create script
components that can be called from other apps like ASP, but it sounds like
you just want use the operating system to run the script. Try creating a
.vbs file with just the script in it and run that under task scheduler (or
just double-click it from Explorer).
Phil
> I'm trying to create a wsc file to automatically delete files once a week
> using the window script component wizard and added my coded. I
schdeduled
> it in the MS Schedule task to test it. The only thing it does when the
time
> comes is bring up the code in notepad. I think it could be my script.
>
> <?xml version="1.0"?>
> <component>
>
> <registration
> description="deleteFile"
> progid="deleteFile.WSC"
> version="1.00"
> classid="{ae9c2bf3-0489-434f-8c94-fc51b3a1ac7c}"
> >
> </registration>
>
> <public>
>
> </public>
>
> <implements type="ASP" id="ASP"/>
>
> <script language="VBScript">
> <![CDATA[
> Dim oFSO, strcsvFolderPath
> strcsvFolderPath = "d:\inetpub\wwwroot\temp\"
> set oFSO = Server.CreateObject("Scripting.FileSystemObject")
> oFSO.DeleteFile (strcsvFolderPath & "*.*")
> set oFSO = nothing
>
> ]]>
> </script>
>
> </component>
>
> Any help is appreciated.
>
> khanh
>
|
|
 |