Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Moving files from one folder to another folder Expand / Collapse
Author
Message
Posted Tuesday, October 16, 2012 5:25 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, March 12, 2013 3:57 AM
Points: 93, Visits: 237
Hi,

I have one folder with two files

C:\Pkg\28052012_sample.xlsx

C:\Pkg\29052012_sample.xlsx

Using SSIS 2005 i have loaded the data from the above xlsx file using For each loop container.

Query:

Need to move the file to D:\Archive, after the package successfuly loaded the data.


Could you please let me know the steps?

Regards
Sqlstud
Regards

Sqlstud




Post #1373152
Posted Tuesday, October 16, 2012 5:30 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, August 28, 2014 2:39 AM
Points: 1,880, Visits: 2,846
I'd consider kicking of an executable batch job from ssis.

ref: http://ask.metafilter.com/50369/How-to-move-files-into-subdirectories-in-batch-job


----------------------------------------------
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.
Post #1373156
Posted Tuesday, October 16, 2012 5:42 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:28 PM
Points: 5,485, Visits: 10,323
Or you can use the File System Task built into SSIS.

John
Post #1373163
Posted Tuesday, October 16, 2012 5:55 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, March 12, 2013 3:57 AM
Points: 93, Visits: 237
sqlstud (10/16/2012)
Hi,

I have one folder with two files

C:\Pkg\28052012_sample.xlsx

C:\Pkg\29052012_sample.xlsx

Using SSIS 2005 i have loaded the data from the above xlsx file using For each loop container.

Query:

Need to move the file to D:\Archive, after the package successfuly loaded the data.


Could you please let me know the steps?

Regards
Sqlstud
Regards

Sqlstud







is it possible to rename the file after moved to destination folder

Regards
Sqlstud
Post #1373176
Posted Tuesday, October 16, 2012 5:59 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:28 PM
Points: 5,485, Visits: 10,323
I'll let you find that out for yourself. Just type "File System Task" into your favourite search engine.

John
Post #1373179
Posted Tuesday, October 16, 2012 6:01 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, March 12, 2013 3:57 AM
Points: 93, Visits: 237
sqlstud (10/16/2012)
Hi,

I have one folder with two files

C:\Pkg\28052012_sample.xlsx

C:\Pkg\29052012_sample.xlsx

Using SSIS 2005 i have loaded the data from the above xlsx file using For each loop container.

Query:

Need to move the file to D:\Archive, after the package successfuly loaded the data.


Could you please let me know the steps?

Regards
Sqlstud
Regards

Sqlstud






Thanks Henrico..

I need to move only after the successful loading.....
Post #1373181
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse