Pake saja DeleteFile(const FileName:string);
----- Original Message -----
From: devy
To: [EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 5:39 PM
Subject: [Delphindo] Wait until Winexec selesai ??
Terima kasih atas saran para delphier semua atas pertanyaan asaya terdahulu.
Dan memang solusi itu berjalan dgn baik, TAPI, sekarang timbul masalah
baru, yaitu
saat WinExec(perintah_delete, SW_SHOWNORMAL); dijalankan
maka program tidak menunggu apakah printah DOS tersebut sudah selesai atau
belum, dan program langsung menjalankan perintah berikutnya
Bagaimana caranya agar program menunggu Winexec / perintah DOS selesai
mengcopy file baru menjalankan proses berikutnya ??
Atau apakah ada parameter yang dapat saya gunakan sebagai indikasi Winexec
selesai dijalankan ??
syntax program saya adalah
winexec_i := WinExec(pchar(scom), SW_NORMAL);
if winexec_i = 0 then
Memo1.Lines.Add('The system is out of memory or resources. ');
if winexec_i = ERROR_BAD_FORMAT then Memo1.Lines.Add('The .EXE file
is invalid (non-Win32 .EXE or error in .EXE image');
if winexec_i = ERROR_FILE_NOT_FOUND then Memo1.Lines.Add('The specified
file was not found.');
if winexec_i = ERROR_PATH_NOT_FOUND then
Memo1.Lines.Add('ERROR_PATH_NOT_FOUND ');
if winexec_i > 31 then
begin
------------
Proses file yang sudah dicopy ...................
----------
end;
Regards
Devy Arifianto
-----Original Message-----
From: aa [mailto:[EMAIL PROTECTED]
Sent: 29 Oktober 2003 17:25
To: [EMAIL PROTECTED]
Subject: Re: [Delphindo] Command Dos Di Delphi ??
const
perintah_delete='command/k for %%v in (C:\*.*) do if exist %%v\nul del
%%v\*.*';
WinExec(perintah_delete, SW_SHOWNORMAL);
> : Atau rekan-rekan ada yang punya cara laen ??
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor
ADVERTISEMENT
Berlangganan: [EMAIL PROTECTED]
Stop Berlangganan: [EMAIL PROTECTED]
Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/i7folB/TM
---------------------------------------------------------------------~->
Berlangganan: [EMAIL PROTECTED]
Stop Berlangganan: [EMAIL PROTECTED]
Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/