//
// //
// 2010年6月26日 //
// Console_Demo //
// haiou327 //
//
program console;
{$APPTYPE CONSOLE}
//{$R *.res}
uses
//shellapi;
SysUtils, windows;
var
s: string;
i: integer;
HOutPut: Thandle;
begin
{ TODO -oUser -cConsole Main : Insert code here }
if ParamCount = 0 then
begin
SetConsoleTitle('Control_Demo 2006.6.26');
hOutput := GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hOutput, 15);
writeln('使用方法:<请输入要创建的目录>');
//SetConsoleTextAttribute(hOutput, 15);
readln(s);
//ShellExecute(0,'open','cmd', pchar('/c md '+s), nil, 0);
if CreateDir(s) = true then
begin
writeln('------------------------------');
writeln('Directory creation successful!');
writeln('------------------------------');
readln;
end
else
begin
writeln('---------------------------');
writeln('Directory creation failure!');
writeln('---------------------------');
readln;
end
end
else
begin
for i := 1 to ParamCount do
begin
Createdir(Paramstr(i));
//readln;
end;
writeln('------------------------------');
writeln('Directory creation successful!');
writeln('------------------------------');
end
end.
lose