Hi, I need to pick data from CSV files one by one from a specific folder and put the data retrieved (in each CSV file) to a table in DB. At the end of processing, I need to delete all the CSV files from that specific folder. I just heard about the For-each Enumerator in SSIS. How can I utilize For-Each enumerator for my requirement? Will there be any option in For-each container to delete CSV files? or should I have to write separate task to do that? If need to write separate task, what task would help me and how to use that? Thanks in advance, Suresh
SSIS Junkie : SSIS: Expressions on ForEach enumerators SSIS 101: Object Variables, ResultSets, and Foreach Loop ... see if this helps.
did you found a solution.i would like to also delete some files thatin a folder base on the date. the date the file was moved to the folder.then if that file is 7 days older it should be deleted.Can you help me out there?
[quote user="alaina.menahem"] i would like to also delete some files thatin a folder base on the date. the date the file was moved to the folder.then if that file is 7 days older it should be deleted.Can you help me out there? [/quote] echo on rem First Delete old SQL Backup Files FORFILES /p C:filename /s /m *.* /d -7 /c “CMD /C del /Q @FILE†rem pause Save the script with a .bat or .cmd extension and schedule it using the Windows Scheduled Tasks applet. Refer to FORFILES COMMAND DETAILS for More details.