Skip to content

Instantly share code, notes, and snippets.

@seumasmorrison
Created June 5, 2017 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seumasmorrison/64e303aeb0e8b61979d03d2fbd3cfeb2 to your computer and use it in GitHub Desktop.
Save seumasmorrison/64e303aeb0e8b61979d03d2fbd3cfeb2 to your computer and use it in GitHub Desktop.
IPython snippet for iterating over hva files in multiple directories on one level which uses shells command and cd single line magic
for directory in dirs:
%cd {directory}
!pwd
hva_files = !ls *.hva
for hva_file in hva_files:
!decode_hva.exe -f csv -o {hva_file[:-4]}%s.csv {hva_file}
%cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment