FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour The list of files from the clipboard
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
The list of files from the clipboard
Posted: Wed May 06, 2015 09:16 PM

Hello,

In the windows folder I select multiple files and copy them to the clipboard. How can I get from the clipboard the names of these files ?

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: The list of files from the clipboard
Posted: Thu May 07, 2015 04:37 PM
Natter,

It seems as we don't get that info. Please make this test:

1. Select several files and copy them from file explorer.

2. open the notepad and paste shows disabled.

I have tried the following code to check if there are several formats in the clipboard:

Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local n := 0, nFormat
   
   while ( nFormat := EnumClipboardFormats( n ) ) == n
      MsgInfo( nFormat )
      n++
   end          

return nil

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>

HB_FUNC( ENUMCLIPBOARDFORMATS )
{
   hb_retnl( EnumClipboardFormats( hb_parnl( 1 ) ) );
}       

#pragma ENDDUMP


And it confirms the explained above. Unless I am missing something
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: The list of files from the clipboard
Posted: Thu May 07, 2015 05:22 PM

A temporary workaround.
Select files in Windows Explorer.
Right-Click while holding Shift key down.
A new option will appear in the context menu named "Copy as access path".
It just copies all filenames (with full paths too) to the clipboard, then you can paste it anywhere else.

Continue the discussion