cancel
Showing results for 
Search instead for 
Did you mean: 

Moving Excel file from one location to another using Dataservices script

maruti_magadum
Explorer
0 Kudos

Hi,

We are using Data services 4.0 sp2 , we are uploading flat file data in oracle database.

After the file upload we need to move that processed file  to another location, so that next day user can put the new file at the same location.

I am not sure whether we can move the complete file using scripts in DS, but came to know that its possible to move the processed file to different location by using OS commands in SQL scripts.

So it is possible to move the file from one location to other ?

I am not expert at  scripting , can i get a help that what script to be be wriiten to move the file from one location to other .

Regards,

Maruti

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Files can be moved using Dos commands in BODS Script with the help of exec function.

This will be something like below,

exec('cmd','move <Existing File Path>\<File Name> <New File Path>')

Regards,

Raji

maruti_magadum
Explorer
0 Kudos

Hi Raji,

Thanks for your kindly reply.

we will try this option.

Thank you,

Maruti

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello

You'll need to use the exec function to invoke OS commands to move files.  I would wrap the call to exec with a print function to aid debugging.  The OS commands will vary depending on your job server OS.

Michael