Forum > General
CreateDir problem
(1/1)
captian jaster:
--- Code: ---program Installer;
uses crt,windows,dos;
var
sel,name : string;
newdir : Pathstr;
user : Text;
BEGIN
writeln('Would you like to install the program?');
writeln('1. Yes i would want to install the program');
writeln('2. No thanks');
sel := readkey;
if sel = '1' then
BEGIN
ClrScr;
writeln('Now installing.');
writeln('Please wait.....');
newdir := Fsearch('C:\Folder', GetEnv(''));
if newdir = '' then CreateDir('C:\Folder');
Delay(3000);
ClrScr;
Writeln('Please type in your name and press enter');
readln(name);
writeln('Please wait....');
assign(user, 'C:\Folder\Pascal.txt');
reset(user);
writeln(user,name);
close(user);
delay(2000);
ClrScr
writeln('Done! You can now close the program.');
END;
if sel = '2' then Halt;
END.
--- End code ---
I get a compiler error
identifier not found "CreateDir"
Please help
i dont know what im doing wrong.
Leledumbo:
--- Quote ---uses crt,windows,dos;
--- End quote ---
You miss SysUtils.
captian jaster:
Thanks. It works now!
Navigation
[0] Message Index