I found the answer. This function returns info about the "copied" file. In my case, there will only be one file in the clipboard, so the following code calls the "GetPasteValue" function. I'm sure you get the idea.
SourceFile := GetPasteValue ;
PastedFileName := ExtractFileName(SourceFile);
SourceExtn := UpperCase(ExtractFileExt(PastedFileName));
Function TfrmMain.GetPasteValue: String;
var
f: THandle;
buffer: Array [0..MAX_PATH] of Char;
i, numFiles: Integer;
sl: TStringList;
begin
if Clipboard.HasFormat(CF_HDROP) then
begin
sl := TStringList.Create;
try
f:= Clipboard.GetAsHandle( CF_HDROP ) ;
If f <> 0 Then
Begin
numFiles := DragQueryFile( f, $FFFFFFFF, nil, 0 ) ;
sl.Clear;
for i:= 0 to numfiles - 1 do
begin
buffer[0] := #0;
DragQueryFile( f, i, buffer, sizeof(buffer)) ;
sl.add( buffer ) ;
end;
end;
if sl.Count > 0 then
Result := sl.strings[0];
finally
Clipboard.close;
FreeAndNil(sl);
end;
end
else
Result := 'NO CF_HDROP';
end;