DTS Package Issue:<BR><BR>I have created several DTS Packages that use text files from the same <BR>directory. Every month we get a new file that replace the ones that we <BR>have. Each file represents 1 DTS package. Here is an example of those <BR>files:<BR><BR>200201_extamb1200.dat<BR>200201_ exthos1200.dat<BR>Util001_20010115.txt<BR>Mba001_2 0010115<BR>Prov001_20010115<BR><BR>The problem is that a portion of the file name changes while the other <BR>portion of the file name will always be the same. For instance the above <BR>text file Util001_20010115.txt<BR>Will change the portion of its name according to the day the file was <BR>created giving the 20010115 to its name. The other part of the file <BR>Util001 always stays the same.<BR><BR>Now the DTS package I have created for this particular file refers to the <BR>entire file name Util001_20010115.txt, so the problem exists when I get <BR>the new file at the end of the month where its name will change to <BR>Util001_20010218.txt. Hence the DTS package will not run because the name <BR>of the file has changed.<BR><BR>Here’s what needs to happen:<BR><BR>1) Create a VB script that would look up a specified name of a file, <BR>in a directory with many files, according to the portion of the file name <BR>that will never change like Util001<BR>2) Once the file is found it would parse out the portion of the file <BR>name that is not used like _20010115<BR>3) Then by creating a Dynamic Properties Task we would change the <BR>source value according to the results performed in the DPT.<BR><BR>The question is how can this be done by just using DPT or a combination of <BR>VB and the FSO object and also by using global variables, SQL, INI in a <BR>DPT.<BR><BR>Any help would help! Thanks <BR><BR>Here is some code that I had created that would use a file that I declared <BR>and then change the name of the file. The only problem is it loops through <BR>the directory and changes the name of the all the files to what I specify. <BR>The other option at the time would be to separate all the files into there <BR>own directory. I want to avoid this if I can by clumping all the files <BR>together and using vb script task prior to transformation process to look <BR>for file name and change the Source value.<BR><BR>&#039;****************************** ****************************************<BR>&#039; Visual Basic ActiveX Script<BR>&#039;********************************** **************************************<BR><BR>Func tion Main()<BR> Main = DTSTaskExecResult_Success<BR><BR>Dim FileName <BR>FileName = "Ref001.txt" <BR><BR> Dim fso, f, f1, fc, s<BR> Set fso = CreateObject("Scripting.FileSystemObject")<BR> Set f = fso.GetFolder("C:InetpubwwwrootdataSourceFilesRefe rral")<BR> Set fc = f.Files<BR> For Each f1 in fc<BR> f1.name = FileName<BR> Next<BR> &#039;ShowFolderList = s<BR><BR>set FileName = nothing<BR>set fso = nothing<BR>set f = nothing<BR>set f1 = nothing<BR>set fc = nothing<BR>set s = nothing<BR><BR>End Function <BR><BR>EXTRA NOTES:<BR>The directory structure look similar to this:<BR><BR> MainDir<BR> Dir1<BR> 2002<BR> April<BR> 200201_extamb1200.dat<BR> 200201_exthos1200.dat<BR> Util001_20010115.txt<BR> Mba001_20010115<BR> Prov001_20010115<BR>