AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos externos
fCopyFile (Example)
WINDEVReportes y ConsultasJava Copying a file
The following code is used to copy a file. The file to be copied and the copied file are selected with the fSelect function. 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
WEBDEV - Código ServidorPHPAjax Copying a file (WEBDEV)
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
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 24/08/2022

Señalar un error o enviar una sugerencia | Ayuda local