Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS and VB Scrpits

Status
Not open for further replies.

jnavarro

Programmer
Dec 1, 2003
89
US
Does anyone know how I can read table values using VB Scripts and DTS?

I am trying to read information store in an sql table, the information in this table is the file name, location and destination. What I need to do is check if files are avail on a source path if so, the file needs to be move to the new destination and rename. This check must be done offer so I am trying to use dts to scheduled this task.


 
Why not do the check to see if the file exists via T/SQL using the xp_fileexist extended stored procedure. Then if it does shell out via xp_cmdshell and move the file.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
That is what I am currently doing, the problem is that I continue to add files. I have about 100 files and I was trying to read the informaiton from a table so I wouldn't have to add more lines of code to copy and rename files.

 
You can still do that with xp_fileexist. Write a cursor and loop through it.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top