Results 1 to 2 of 2

Thread: check file Existing with Python Script

  1. #1
    Join Date
    Mar 2019
    Posts
    12

    Post check file Existing with Python Script

    Are there any way to check the file existence in Python script.

  2. #2
    Join Date
    May 2019
    Posts
    7
    Python provides exists() function which can be used like below.

    import os.path

    if(os.path.exists("/etc/passwd")):

    print("/etc/passwd exists")

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •