Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-04-2019, 05:54 AM
rmt rmt is offline
Senior Member
 
Join Date: Jun 2013
Posts: 295
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
__________________
Rmt

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 06:23 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.