Quantcast
Viewing latest article 16
Browse Latest Browse All 46

Answer by Love and peace - Joe Codeswell for How do I check whether a file exists without exceptions?

Here's a 1 line Python command for the Linux command line environment. I find this VERY HANDY since I'm not such a hot Bash guy.

python -c "import os.path; print os.path.isfile('/path_to/file.xxx')"

I hope this is helpful.


Viewing latest article 16
Browse Latest Browse All 46

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>