June 26, 2008 at 11:17 am
Have several files with different names in a directory with a date added to the end of the files each month. I want to remove the dates from the end of the files using SSIS.
June 26, 2008 at 11:23 am
To get you started, you'll want to use a ForEach container and the FileSystem task. Exactly how you would use them, I don't know off the top of my head.
😎
June 26, 2008 at 2:33 pm
Use a ForEach loop container to loop through all the files in the specified folder, place a File System Task inside the ForEach container and use the Rename file operation. Then use expressions in the File System Task to generate your new file names without dates.
June 26, 2008 at 2:38 pm
Hi,
My problem is that the source file comes monthly with a date in the name and each month it will be diffrent. I need to get the file without the date...
June 26, 2008 at 2:55 pm
Thats where expressions will come in handy, you can build up the filename as required.
Something like this:
"FileName" + (DT_STR, 4, 1252) YEAR(GETDATE()) + (DT_STR, 2, 1252) MONTH( GETDATE()) + ".txt"
Then once you have located the file you can do the same to get rid of the date in the name.
June 27, 2008 at 6:26 am
Thanks.... will give it a try:)
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply