cancel
Showing results for 
Search instead for 
Did you mean: 

How can we unrar a file by using Data Services and update the status in table.??

bhanu_prakash37
Explorer
0 Kudos

Hi EveryOne,

Please help me below scinario

I Have a table in below format

SnoFile NameFile ExtensionFile pathStatus
1ABCTXTC:\Users\Bhnau\Desktop\New Folder
2PQRTXTC:\Users\Bhnau\Desktop\New Folder
3XYZTXTC:\Users\Bhnau\Desktop\New Folder

By using Sap BODS I need to go  the above path which is mention in FILE PATH COLUMN  and unrar the file in that path and copy the  files in another folder and i need to update the status of that file whether its is extracted and copied if yes i need to updates as extracted or failed.

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member200473
Contributor
0 Kudos

Hi Bhanu,

here is the code for creating ".bat" file.

@echo off

@echo Extracting the file..

set path="C:\Program Files\WinRAR\";%path%    

unrar x c:\myfile.rar c:\ ( to the folder you want to extract)

@echo all files extracted

save this code "abc.bat"

goto bods ,use script object and write below code

exec('C:\abc.bat','',8);

It has worked for me perfectly.

Regards,

Shiva Sahu

Former Member
0 Kudos

Could you please try calling the exec command for the Unrar and to  copy the files from one folder to the other folder.In order to pick up the path you can use the SQL function.

bhanu_prakash37
Explorer
0 Kudos

Keerthi thanxs for your information and actually am looking how to execute this by using abap in depth process

cheers

Bhanu