Get file from pasteboard

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 11


Get file from pasteboard (xIndex) String

ParameterTypeDescription
xIndexNumberXth file included in drag action
Function resultStringPathname of file extracted from pasteboard

Description

The Get file from pasteboard command returns the absolute pathname of a file included in a drag and drop operation. Several files can be selected and moved simultaneously. The xIndex parameter is used to designate a file from among the set of files selected.

If there is no Xth file in the pasteboard, the comand returns an empty string.

Example

The following example can be used to retrieve in an array all the pathnames of the files included in a drag and drop operation:

   ARRAY TEXT($filesArray;0)
   C_TEXT($vfileArray)
   C_INTEGER($n)
   $n:=1
   Repeat
      $vfileArray:=Get file from pasteboard($n)
      If($vfileArray#"")
         APPEND TO ARRAY($filesArray;$vfileArray)
         $n:=$n+1
      End if
   Until($vfileArray="")

See Also

SET FILE TO PASTEBOARD.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next