OK, I'm pretty sure this is an easy one, but since I have close to zero 
experience with AppleScript, I have to ask:

Could anyone please help me with a script that gets the path to the 
containing folder of the current (open, frontmost) text file of BBEdit?

Concrete use: I would then add to the script the command to delete from 
that folder files by extension. When running pdflatex, I get lots of 
auxiliary files that are not needed, so I intend to use such a script for 
"cleaning up" the folder, to be left only with .tex and .pdf files in that 
folder.

I would add to the script something like:


*tell* *application* "Finder"

*delete* (*every* *item* *of* *folder* (*path to* filePath) *whose* name *does 
not* *end* *with* ".tex" *or* ".pdf" *or* ".eps" *or* ".bbprojectd" *or* 
"tags" *or* ".ist")

*end* *tell*

But the hardest part is getting that filePath...

Thank you!

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to