PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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 - Server codeReports and QueriesWindows MobileAjaxUser code (UMC) 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 memory Table control (TABLE_ArchiveTable).
Caution: In order for the subscript of the memory Table control to correspond to the subscript of the selected file, the memory 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
FileSubscript is int
// Select the file in the archive
FileSubscript = 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 - Server codeReports and QueriesWindows MobileAjaxUser code (UMC) 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
 
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment