dbTalk Databases Forums  

Active X script to delete a file

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Active X script to delete a file in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lintadsl
 
Posts: n/a

Default Active X script to delete a file - 11-17-2003 , 09:17 AM






How can I write a delete file if there is one within
ActiveX scrpt?

I got an error at createobject line.

Function Main()
dim fs
set fs = createobject("scripting.filesystemobject")
fs.deletefile "\\mypc\shared\newfile.xls"
set fs = nothing
Main = DTSTaskExecResult_Success
End Function

Any advice would be help
Thanks.
Lintadsl

Reply With Quote
  #2  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: Active X script to delete a file - 11-17-2003 , 09:41 PM






Could be permissions, could be the file system library is
not installed on the client where executing, etc. It all
depends on what the specific error message is.

-Sue

On Mon, 17 Nov 2003 07:17:16 -0800, "Lintadsl"
<anonymous (AT) discussions (DOT) microsoft.com> wrote:

Quote:
How can I write a delete file if there is one within
ActiveX scrpt?

I got an error at createobject line.

Function Main()
dim fs
set fs = createobject("scripting.filesystemobject")
fs.deletefile "\\mypc\shared\newfile.xls"
set fs = nothing
Main = DTSTaskExecResult_Success
End Function

Any advice would be help
Thanks.
Lintadsl


Reply With Quote
  #3  
Old   
Geo
 
Posts: n/a

Default Re: Active X script to delete a file - 11-18-2003 , 04:24 AM



Hi I tried the function that you are using and it works fine as long as you
assign a drive letter to it, i.e. C:\mypc\shared\newfile.xls" I hope this
helps.

"Lintadsl" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
How can I write a delete file if there is one within
ActiveX scrpt?

I got an error at createobject line.

Function Main()
dim fs
set fs = createobject("scripting.filesystemobject")
fs.deletefile "\\mypc\shared\newfile.xls"
set fs = nothing
Main = DTSTaskExecResult_Success
End Function

Any advice would be help
Thanks.
Lintadsl



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.