By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,857 Members | 1,768 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,857 IT Pros & Developers. It's quick & easy.

broken links

P: n/a
rbt
How can I find broken links (links that point to files that do not
exist) in a directory and remove them using Python? I'm working on RHEL4

Thanks,
rbt
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
rbt
I found it:

os.path.exists(path)
On Fri, 2005-07-22 at 09:22 -0400, rbt wrote:
How can I find broken links (links that point to files that do not
exist) in a directory and remove them using Python? I'm working on RHEL4

Thanks,
rbt


Jul 22 '05 #2

P: n/a
rbt
I found it:

os.path.exists(path)
On Fri, 2005-07-22 at 09:22 -0400, rbt wrote:
How can I find broken links (links that point to files that do not
exist) in a directory and remove them using Python? I'm working on RHEL4

Thanks,
rbt

Jul 22 '05 #3

P: n/a
OR: (I think it does the same thing)

os.access(filename,OS.F_OK)

Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.