Promotic
WikipediaLinkedInYoutubeTwitterFacebook

FileCopy - method of object Pm

Description:
Copy of the file.
Syntax:
FileCopy(sExistingFile As String, sNewFile As String, bFailIfExist As Boolean) As Boolean
Calling:
b = Pm.FileCopy(sExistingFile, sNewFile, bFailIfExist)
Parameters:
sExistingFile(String) file name (with the path) to copy. If a full path is not entered, it is completed relatively according to the application file folder.

It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files and folders.

sNewFile(String) Path and name of the newly created file. Folder, where the file is created, must exist, else the method fails.

It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files and folders.

bFailIfExist(Boolean) operation mode
0 - existing file will be overwritten by a new one
1 - method fails it the created file already exists
Return Values:
true - operation passed successfully
false - operation failed
Note:
The method cannot be used for multiple copy (e.g. *.*).
 
This method is not functional for Web Panels.
Example:
Pm.FileCopy "#data:boildat.ini", "C:/Backup/boildat1.ini", 0
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- FileCopy
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice