dbTalk Databases Forums  

VBScript Question

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


Discuss VBScript Question in the microsoft.public.sqlserver.dts forum.



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

Default VBScript Question - 08-20-2003 , 10:28 AM






PS if this is posted on google as well pardon duplication.

Inside my ActiveX of my DTS package I am trying to scroll through my
directory and based on FileExtension process or move file to archive.

I want if the file is a dbf extension and not a i.dbf and d.dbf to
process the file otherwise move the file to archive.
I do a stripofffileextexsion to get they i.dbf and d.dbf
I have mulitple dbf files
matta.dbf
mattb.dbf
mattd.dbf
matti.dbf
etc...
If the file is not a dbf extension then move to archive directory.

so here is my if statement that I use as I only want to process correct
dbf.

if DTSGlobalVariables("gv_FileExtension").Value = "dbf" or
(StripOffFilePart( DTSGlobalVariables("gv_FileFullName").Value,".") <>
"i.dbf" or StripOffFilePart(
DTSGlobalVariables("gv_FileFullName").Value,".") <> "d.dbf") Then

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #2  
Old   
JFB
 
Posts: n/a

Default Re: VBScript Question - 08-20-2003 , 04:17 PM






Hi mattew,
For this you can use FSO to select which file you want to process or
archive.
http://www.tutorial-web.com/asp/fso/...?property=Name
JFB


"matthew larson" <mattclarson (AT) hotmail (DOT) com> wrote

Quote:
PS if this is posted on google as well pardon duplication.

Inside my ActiveX of my DTS package I am trying to scroll through my
directory and based on FileExtension process or move file to archive.

I want if the file is a dbf extension and not a i.dbf and d.dbf to
process the file otherwise move the file to archive.
I do a stripofffileextexsion to get they i.dbf and d.dbf
I have mulitple dbf files
matta.dbf
mattb.dbf
mattd.dbf
matti.dbf
etc...
If the file is not a dbf extension then move to archive directory.

so here is my if statement that I use as I only want to process correct
dbf.

if DTSGlobalVariables("gv_FileExtension").Value = "dbf" or
(StripOffFilePart( DTSGlobalVariables("gv_FileFullName").Value,".")
"i.dbf" or StripOffFilePart(
DTSGlobalVariables("gv_FileFullName").Value,".") <> "d.dbf") Then

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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.