0

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

0

2 Answers 2

1

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")
1
  • @Duns If it works you may accept the answer.
    – Bodo
    Commented Feb 12, 2019 at 19:13
0
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 ]]
then
mention commands which is required
else
echo "subdirectory doesnt exists"
fi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .