On Sat, Jun 12, 2010 at 21:02, Marius Hofert <m_hofert(a)web.de> wrote:
I have a file with a certain extension. In the folder
where this file is located, there is a file with the same name but extension .pdf. How do
I create a command that removes the .pdf?
My first trial was this (bundle editor):
1) Save: Current File
2) Command(s): rm "$TM_FILENAME/Rd/pdf"
3) Input: None
4) Output: Discard
So I guess 2) is the problem. How can I replace the file extension by .pdf?
* The braces are part of the shell syntax for pattern replacement.
* Prefixing the pattern with `%` makes sure it only matches the end of
the expanded string.
* $TM_FILENAME contains just the `basename` of the current file, use
$TM_FILEPATH for its absolute path.