Pathlist = List ( path & "file1.pdf" path & "file2.pdf" ) ] īE_Zip ( pathlist path & "archive. Path = ConvertFromFileMakerPath ( Get ( DocumentsPath ) PosixPath ) You need to convert the docs path into a plugin path first, and then do : This is a limitation of the zip format, not a plugin limitation.Įxample : you have 2 files in the documents folder called file1.pdf and file2.pdf that you want to add to a zip called archive.zip in the same folder. then it will store both files in the zip, BUT when you unzip the second file will overwrite the first one. Replaces the existing response even if the SetStatus flag is set. Leaves the response untouched only if the SetStatus flag is set. ![]() So if you run :BE_Zip ( List ( "myfile.txt" "folder/myfile.txt" ) ) Specifies what happens to an existing response when the HTTP status code is an error, i.e. We do this by keeping the ClipManager file in the preferences folder, instead of alongside the three main BaseElements files. the zip file format doesn't have a provision for adding files of the same name. 4.2.0 : added the option to allow filePathList to be a container field. return an error if more than one file with the same name is added to the archive +1: A scenario where os.path.dirname(path) is handy compared to pathlib.Path(path).parent: You are given a string path.You want to create the directory of path if it does not exist, whether path itself is a directory or not. 4.1.3 : don't crash when there's nothing to archive. 3.0.0 : improved error handling, create empty directories in archives 2.3.0 : modified the file parameter to allow a list of file paths, instead of a single file/folder. 2.2.0 : added the archiveFilePath parameter For example, by using basename: os.path.basename (path) Return the base name of pathname path. ![]() And given the full path, then you can split normally to get the last portion of the path. This is the first element of the pair returned by passing path to the function split (). archiveFilePath : the full path to the archive output file. In addition to the other replies, sometimes the BaseElements plugin wants the OS file path, but without the leading volume on it. Return the directory name of pathname path. Or a return separated list of paths to files. FileMaker Pro plugin used for BaseElements to provide file, dialog and XSLT functions. This will overwrite an existing file if it exists with that name already. The character used to separate the directory names (also called the delimiter) is specific to the file system: The Solaris OS uses the forward slash (/), and Microsoft Windows uses the backslash slash (\). If the archive parameter is not specified, then the zip file is put into the same folder as file and has the. BE_Zip BE_Zip(filePathList )Ĭompresses the file(s) found at the path file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |