Thanks you both for your help.
I managed to get it done through script task. :)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have a csv file in a folder which needs importing to a table and then archive to another folder.
The SSIS package I have developed will first look for the file if it exists through a script task and then if exists, will proceed with truncate and load and then execute process task will move the file to archive.
The issue for me is at the load part... the name of the file will change every week and I want the connection string expression to just look for any .csv and process it-->@@[User::ToBeProcessed]+".csv"..But there is an error as invalid file as the file name is getting replaced by *.
Any suggestion please?
P.S not using foreachloop because there will be only one file to process and looping is not necessary at the moment.
Thanks in Advance :)
Thanks you both for your help.
I managed to get it done through script task. :)
You could try to add a login in Script task, something like - if the file exists, then rename it to "InputFile.txt" and have this name hardcoded when you import data to table.
Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav
Hi @jennifer zen ,
May I know if these files have same structures?
Please add an example value in variable [User::ToBeProcessed].
Hope the following link will be helpful:
Creating dynamically generated CSV files containing SQL Server data
Best Regards,
Mona
----------
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.