CopyFileListToClipboard

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > File >

CopyFileListToClipboard

available from build: 20130125

Description

The command copies in the Clipboard a file list passed as a TXT file in input to the command.

Syntax

call DBWShell("CopyFileListToClipboard txtFileList")

Parameter

txtFileList

a text file containing a list of paths; full file path for each line

Remarks

The TXT file must be encoded in ANSI.

See also

DBWGetValueFromMemory in Standard Library
DBWSetValueToMemory in Standard Library

Example

Sub main()
 DBWInit(true)
 Set fs = CreateObject("Scripting.FileSystemObject")
 Set tfolder = fs.GetSpecialFolder(TemporaryFolder)
 txtFileList = tfolder & "\myFileList.txt"
 If fs.FileExists(txtFileList) then
  fs.DeleteFile(txtFileList)
 End if
 Set a = fs.OpenTextFile( txtFileList, ForAppending, True )
 a.WriteLine("C:\temp\myFile1.PDF") ' add here your file full path names
 a.WriteLine("C:\temp\myFile2.DXF") ' add here your file full path names
 a.WriteLine("C:\temp\myFile3.DWG") ' add here your file full path names
 a.Close
 DBWShell("CopyFileListToClipboard " & Replace(txtFileList," ","|") )
End Sub