You can make forlder, remane forlder, delete forlder, checking folder by delphi command
File function in delphi :
- checking file is exist or not :
if FileExists( 'test.xls' )=false then
showmessage ( "this file is not exist" ) ; - checking folder is exist or not :
if directoryexists( xIsFolder ) then
showmessage ( "this folder is not exist" ) ; - Close windows or program :
var
x6h : hwnd;
begin
x6h := findwindow(nil,"google - microsoft internet explorer"); // check windows / ie
if x6h<>0 then postmessage ( x6h,wm_close,1,0); // close windows / ie
end; - Delete file :
sysutils.deletefile ( pchar('coba.xls') ) ; - Rename file :
renamefile ( 'c:\temp\test1.XLS', 'c:\temp\test77.XLS' ); - Openning file :
first add in uses
uses
Windows, Messag . . . . . . . . . . . . . . . . . . , Dialogs, StdCtrls,
shellapi ;
begin
shellexecute (handle,'open',pchar( 'c:\temp\text44.txt' ),nil,nil,sw_show) ;
end;
- To know the current drive in delphi :
showmessage ( 'the current drive is ' + GetCurrentDir ) ;
0 comments:
Post a Comment