If I use:
!ls '/Users/martyn/Documents/rawData'
it gives me a list of the files in the required directory.
But I want to paramterize this. I tried:
pathData = '/Users/martyn/Documents/rawData'
!ls pathData
But this gives the error:
ls: pathData: No such file or directory
I can see the problem ... but can't see how to fix it. Any help would be greatly appreciated.
You probably need
!ls {pathData}
or
!ls $pathData
Using only %ls
gives you the list in your current directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With