How can I append an md-file to another md-file in a subfolder as Dolphin action?
I tried cat %U >> subfolder-name/%u, but I get this error message:
cannot create subfolder-name//path/to/md-file/md-file.md: Directory nonexistent.
(this is not working for me)

provisory workaround

Symlink destination file in the starting folder (calling it file-name.md.olon") and use
cat %U >> %u.olon


According to the error message

cannot create subfolder-name//path/to/md-file/md-file.md

the placeholder %u is replaced with an absolute path and a directory subfolder-name/path/to/md-file does not exist. If you want to create a file subfolder-name/md-file.md you can use basename

cat %U >> subfolder-name/$(basename "%u")
  • @Duns If it works you may accept the answer. – Bodo Feb 12 at 19:13
Before executing the command in directory subfolder

First check whether directory exsists or not then go ahead for executing the command

below is script format for the same

if [[ -d subdirectoryname ]]
mention commands which is required
echo "subdirectory doesnt exists"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.