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.
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