View Single Post
Old 04-04-2019, 05:54 AM
rmt rmt is offline
Senior Member
Join Date: Jun 2013
Posts: 299
Default ShellExecute from Delphi5 application

Dear Expert,
I need to execute following command line from delphi5 application:

C:\Windows\system32>aws s3 cp "c:\test.csv" s3://testbucket/

I am coding as below:

ShellExecute(0, nil, 'cmd.exe', 'aws s3 cp "c:\test2.csv" s3://testbucket/', nil, SW_HIDE);

I tried the below code too:

ShellExecute(handle,'open',PChar('c:\Windows\syste m32\cmd.exe'), PChar('aws s3 cp "c:\test2.csv" s3://myerofirstbucket/'), '', SW_SHOWNORMAL);

But the file is not being copied in the required destination. However, if I run the above command from CMD, its coping successfully. Kindly suggest.

Thanks in advance

Last edited by rmt; 04-04-2019 at 10:28 AM.
Reply With Quote