PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Copying a file
  • Copying a file (WINDEV Mobile)
  • Copying a file (WEBDEV)
fCopyFile (Example)
Copying a file
WINDEVReports and QueriesJavaUser code (UMC) The following code is used to copy a file. The file to copy and the copied file are selected by fSelect. A progress window is displayed (frProgress constant).
// Declare the variables
FileToCopy is string
CopiedFile is string
ResCopy is boolean

// Select the file to copy
FileToCopy = fSelect("", "", "Select the file to copy", ...
"All files (*.*)" + TAB + "*.*", "", fselOpen + fselExist)

// Select the copied file
CopiedFile = fSelect("", "", "Select the copied file", ...
"All files (*.*)" + TAB + "*.*", "", fselCreate)

// Copy the file
ResCopy = fCopyFile(FileToCopy, CopiedFile, frProgress)
// Display an error message if the copy failed
IF ResCopy = False THEN
Error(ErrorInfo(errMessage))
ELSE
Info("The file was copied")
END
Copying a file (WINDEV Mobile)
Windows Mobile The following code is used to copy a file.
// Declare the variables
FileToCopy is string = "\My files\FileA.txt"
CopiedFile is string = "\My Files\FileB.TXT"
ResCopy is boolean

// Copy the file
ResCopy = fCopyFile(FileToCopy, CopiedFile)
// Display an error message if the copy failed
IF ResCopy = False THEN
Error(ErrorInfo(errMessage))
ELSE
Info("The file was copied")
END
Copying a file (WEBDEV)
WEBDEV - Server codePHPAjax The following code is used to copy a file.
// Declare the variables
FileToCopy is string
CopiedFile is string
ResCopy is boolean

// Select the file to copy
FileToCopy = "C:\Directories\FileB.doc"
// Select the copied file
CopiedFile = "C:\Directories\FileA.doc"

// Copy the file
ResCopy = fCopyFile(FileToCopy, CopiedFile)
// Display an error message if the copy failed
IF ResCopy = False THEN
Error(ErrorInfo(errMessage))
ELSE
Info("The file was copied")
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment