Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Anonymous wrote:

i used this command

tar -cz -f "'basename \'pwd\''.tgz" !&


its not working unfortunately. only create a tar file as 'basename \'pwd\''.tgz

There are backticks `, not single quotes '.
Though the $(basename "$PWD") is indeed equivalent.

Anonymous wrote:

i need to know how to do the popup command below to convert as above

tar -cz  -f "!?&Archive Name:?archive .tgz!" !&


i just need to replace "archive .tgz" to "$(basename "$PWD").tgz" but its not working like that at the moment

any help ?

That's not possible using such a simple custom command. You would have to implement much more complicated separate script that does the parsing and prompting and then opens its own session to call the tar.
See https://winscp.net/eng/docs/guide_custom_commands_automation
Guest

anyway i managed to get this work up to certain level. without popup. anyway here is the working code so far. hole this helps anyone

tar -zcvf "$(basename "$PWD").tgz" !&


i need to know how to do the popup command below to convert as above

tar -cz  -f "!?&Archive Name:?archive .tgz!" !&


i just need to replace "archive .tgz" to "$(basename "$PWD").tgz" but its not working like that at the moment

any help ?
Guest

i used this command

tar -cz -f "'basename \'pwd\''.tgz" !&


its not working unfortunately. only create a tar file as 'basename \'pwd\''.tgz

please help me to sort this. im stucked
martin

Re: automatically getting current working directory name for creating tgz file custom command

tar -cz -f "`basename \`pwd\``.tgz" !&
Guest

automatically getting current working directory name for creating tgz file custom command

i currently use this custom command :

tar -cz  -f "!?&Archive Name:?archive .tgz!" !&


which means a window popup on wisncp and i can manually enter the tar file name (renaming archive.tgz as the above custom command shows) and hit ok so file going to be compressed as .tar or .tgz file format.

i need to know how instead of "archive.tgz" how to get automatically "current working directory name".tgz for creating tgz file for the selected files in that current working directory ?

any help guys ? i am stucked

put at least a bump if you can . thanks for the help.