March 22, 2004 at 8:41 am
I would like to set up a nightly routine which deletes Winzip files which are no longer required.
The zip files would be contained in a single directory.
The files I want to keep would be listed in a table.
I imagine that I would use an ActiveX Script with a for each loop and the FileSystemObject to delete the files but I don't know how to identify in an ActiveX script whether the file name exists in a table.
March 22, 2004 at 8:01 pm
You may need to open a SQL connection and get the names using ado but insert them into an array object in the vb script, this way you can move easily and freely thru the items. Don't have code on me but should be simple enough.
March 22, 2004 at 8:22 pm
Take a look at this example,
http://www.sqldts.com/default.aspx?298
--------------------
Colt 45 - the original point and click interface
March 23, 2004 at 5:13 am
Would appreciate bit more guidance how I pull this all together.
"You may need to open a SQL connection and get the names using ado but insert them into an array object in the vb script, this way you can move easily and freely thru the items"
This is a bit high level for me, if poss would appreciate the logic in a little more detail. Are there any examples around using Arrays?
"Take a look at this example"
Am using this example to process a table, winzip files etc. But not sure how to use it in the scenario I described unless I step through the files in the directory one at a time using the FileSystemObject and for each file I then step through an SQL Rowset.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply