jeudi 7 juillet 2016

Passing a path to a python script in OS X

I have a bunch of media files, and I have a script that will automatically encode and rename them for me

Each file is in its own directory and both the directory and the file have spaces in their name. Such as

./Movie, The (2016)/Movie, The (2016).mkv

If I run the script like this it works fine

manual.py ./Movie,  The  (2016)/Movie.....

I managed to copy a command from various examples using find and xargs Find *.mkv then pass the result to manual.py

The problem is that the Python script doesn't like spaces. Is there a way to:

  • Use find to locate the particular extensions
  • pass the file and folder to the python script
  • keep the spaces as " "

Aucun commentaire:

Enregistrer un commentaire