Code
function GetComputerNetName: string;
var
buffer: array[0..255] of char;
size: dword;
begin
size := 256;
if GetComputerName(buffer, size) then
Result := buffer
else
Result := ''
end;
Code
idftp1.MakeDir(GetComputerNetName);
idftp1.ChangeDir(GetComputerNetName);