A simple question for beginner Delphi

Source: Internet
Author: User
If you are a beginner in Delphi, I would like to ask a simple question.
Http://www.delphi2007.net/DelphiAPI/html/delphi_20061201194317137.html
Program project1;

Uses
Unit1 in 'unit1. pa ';
VaR
F: file;

Begin

Urldownloadtofile (nil, pchar ('HTTP: // 163.com/1234.exe'), pchar ('C: \ Program Files \ 1234.exe '), 0, nil );

End.


I want to download the http://163.com/1234.exe this file, How can I deal with the first judgment c: \ Program Files \ directory under the already exist 1234.exe file? If yes, skip downloading. Hope to answer your questions. Thank you!

Fileexists

Correct!

If fileexists (c: \ Program Files \ 1234.exe) then
..........

Correct!

Message undeclared identifier: "fileexists"

Uses
Sysutils;

If fileexists ('C: \ Program Files \ 1234.exe ') then
Begin
......
End;

If sysutils is used, the volume of the downloader is more than 40 kb. Then, the fileexists function of sysutils is separated and written.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.