0

I have a python script that searches for some regular expression when given a file/folder of files. I was wondering if there was some way I could open terminal (I'm on MacOS) drag and drop a folder of files (or the files individually) and have the script run on said files?

Sockey
  • 169
  • 1
  • 3
  • 10
  • Would this be what you're wanting to do? https://stackoverflow.com/questions/1515730/is-there-a-command-like-watch-or-inotifywait-on-the-mac – Cory Madden Jul 25 '17 at 18:38
  • Not really. I want my python script to execute on the files given, i.e. I don't want to hardcode in the file location for the script to act on, nor do I want to type it in every time I run the file. Apologies if my wording is poor, I'm fairly new to this. – Sockey Jul 25 '17 at 18:52
  • But that's what the answer in the link I provided does. You don't have to do anything, it just watches for changes to the directory. – Cory Madden Jul 25 '17 at 18:53
  • Sorry, I must have misunderstood what was going on. I'll have a more thorough read of the link provided – Sockey Jul 25 '17 at 18:57

0 Answers0