• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 162
  • Last Modified:

downloading files

well, waht i want to do is a program in Pascal that does this:

Downloads two files(I don´t know if this is possible in Pascal);
then it runs the programs like this
c:\Program1.exe Program2.exe
The program2 is a parameter to Program1.exe

Thks
Any anwser is welcome and apreciated
0
Holy_Vampire
Asked:
Holy_Vampire
1 Solution
 
dbruntonCommented:
The second part's possible.

uses Dos;


SwapVectors;
Exec(GetEnv('COMSPEC'), Command);
SwapVectors;


Examine the Exec command under Turbo Pascal.  The second part possibly but downloading from what and where.
0
 
VGRCommented:
you can download files if you've any HTTP component like NMHTTP
0
 
NoturnoCommented:
The solution for the first part is to use any windows program (you can make these programs) that downloads the files for a folder defined by you. After you can read these files in the predefined folder.
The method to make a program that download the files in Delphi is descripted by VGR above.

Regards,

Gleyson -> Noturno

(For give for my poor english, i'm Brazilian)
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
VGRCommented:
I can even expand on this, as I use it extensively 8-))

The solution for your problem may be (and shall be ?) done 100% in Delphi, starting with D4

if you want some code...
0
 
Newt6398Commented:
Not quite sure what you mean: but try

WinExec('Myprogdir\MyProg.exe');

to pass parameters such as for internet explorer you can do
this

WinExec('C:\program files\internet explorer\iexplore.exe www.yahoo.com');

put this in a button click to try it.

Winexec is for backward compatibility to win16 might be better to use the create process function.
0
 
CleanupPingCommented:
Holy_Vampire:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
VGRCommented:
del & norefund
0
 
dbruntonCommented:
No, PAQ and no refund.
0
 
VGRCommented:
(always agrees with dbrunton)
0
 
AnnieModCommented:
PAQ'd and 40 points NOT refunded

AnnieMod
CS Moderator
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now