Hi all,

Can any one please suggest me to write a Shell script for the following requirement.
Please find the following steps.

1.Connect to remote server and use WinSCP to retrive the file "emp.dat" from the above mentioned server in the defined path. This is the EMP file.

2.Open the abc.txt file present in D:\EFG. NOTE: abc.txt is used to process the data in XYZ.mdb file.

3.Place the records in abc.txt and just validate for the number of records with the source file.

4. Delete the RST.xls present in D:\EFG\

5. Once the latest abc.txt is ready, open the D:\EFG\XYZ.mdb access file.

6. Click on Open, then on "Daily Sales Vs. Report".

7.Click on "Import Data" tab. "ALL EXISTING DATA WILL BE LOST !!!" msg will pop up. Just click on "OK" tab.

8.XYZ.mdb will prompt for ODBC connection password. Supply the same to connect to PRODUCTION DB.
Username rod_abc

9. Once data gets imported, "Import Completed" pop-up window appears.

10. Click "OK". Then click on "Output to Excel" tab to export the data to excel sheet.

11.Pop-up window "Export Complete" appears. Click on "OK".

12.This export will generate an RST.xls file in D:\EFG\ path. Open the .xls and run the below macros.
Goto Tools --> Macros --> Macros, to run the Macros from Excel sheet.

13. Run the macro - "PERSONAL.XLS!macNewEFG".

14.Once done, save the RST.xls as Sales vs. Report - .xls in D:\EFG folder.

Send then this generated report to respective mail-ids automatically.

daily manually we are doing this job. But I am planning to do it automatically.

so can any one please give me ur suggestions fir this.

Thanks in advance.