AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos
  • Example 1: Modifying the stored path of a file in an archive
  • Example 2: Modifying the stored path of a file in an archive
zipChangePath (Example)
Example 1: Modifying the stored path of a file in an archive
WINDEVWEBDEV - Código ServidorReportes y ConsultasCódigo de Usuario (UMC)Ajax The following code is used to modify the stored path of a file in an archive. The archive is already opened and it contains several archived files. The stored path of the file only contains the name and the extension of the file. The file whose path must be modified is selected in a Table control populated programmatically (TABLE_ArchiveTable).
Caution: In order for the index of the Table control populated programmatically to match the index of the selected file, the Table control must not be sorted.
// --Click code of "Modify the file path" button
// Declare and initialize the variables
ArchiveName is string = "MyArchive"
ErrorCodeChangePath is int
FileIndex is int
// Select the file in the archive
FileIndex = TableSelect(TABLE_ArchiveTable)
 
// Modify the path of the selected file
ErrorCodeChangePath = zipChangePath(ArchiveName, FileSubscript, "Backup.doc")
 
// Display an error message if the path was not modified
IF ErrorCodeChangePath <> 0 THEN
Error(zipMsgError(ErrorCodeChangePath))
END
Example 2: Modifying the stored path of a file in an archive
WINDEVWEBDEV - Código ServidorReportes y ConsultasCódigo de Usuario (UMC)Ajax The following code is used to modify the stored path of a file in an archive. The archive is already opened and it contains several archived files. The stored path of the file only contains the name and the extension of the file. The file whose path must be modified is selected according to its stored path.
// --Click code of "Modify the file path" button
// Declare and initialize the variables
ArchiveName is string = "MyArchive"
ErrorCodeChangePath is int
 
// Modify the path of the "Report.doc" file
ErrorCodeChangePath = zipChangePath(ArchiveName, "Report.doc", "Backup.doc")
 
// Display an error message if the path was not modified
IF ErrorCodeChangePath <> 0 THEN
Error(zipMsgError(ErrorCodeChangePath))
END
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

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