a complex requirement:
[ol]
[li]I have an folder selected with an relative path like
..\MainFolder\FolderFiles[/li]
[li]I want to create an archive with the content of that folder (all files/subfolders)
..\MainFolder\FolderFiles
The name of that archive should be
MainFolder[/li]
[li]The archive should then be saved in folder
..\MainFolder\FolderArchive
The name of FolderArchive is fixed (just a string).[/li][/ol]
My main problem is to get the MainFolder-string (second last part of the path). Is that possible at all?
You can use {sourcepath|..|nopath|noterm} to get the name of the parent of the current path, or {sourcepath|....|nopath|noterm} to get the name of the grandparent.
@set ArchiveFileName {sourcepath|..|noterm}\FolderArchive\{sourcepath|..|nopath|noterm}.ArchiveExt
{dlgstring|Test|{$ArchiveFileName}}
Copy ARCHIVE CreateFolder={$ArchiveFileName}
The filepath with filename is correct (checked via the dialog), but got an error that the file can't be found??
@Leo: .ArchiveExt is the extension of the archive. It's a zip archive, but with another extension (like e. g. .jar). At the moment I'm testing without the extension, so a .zip should be created. @Jon: No spaces in the path. Tried it already with quotes.
Without any given path, just a name without extension (and with extension) the archive is created and moved in the active dest lister folder.
I really have no glue why that simplified example doesn't work:
@set ArchiveFileName {sourcepath}Test.zip
{dlgstring|Test|{$ArchiveFileName}}
Copy ARCHIVE CREATEFOLDER "{$ArchiveFileName}" ArchiveFileName contains a valid path with filename.