Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8326009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:37:50+00:00 2026-06-09T00:37:50+00:00

I am writing following program : ***import os filepath=r’C:\TestData\openfolder.html’ abc=open(filepath,’w’) abc.writelines(‘<html><head></head><body>’) abc.writelines(‘<a href=os.startfile(filepath)>First Link</a>\n’)

  • 0

I am writing following program :

***import os
filepath=r'C:\TestData\openfolder.html'
abc=open(filepath,'w')
abc.writelines('<html><head></head><body>')

abc.writelines('<a href="os.startfile(filepath)">First Link</a>\n')

abc.writelines('</body></html>')***

What I want to do is if I click First Link on a browser, I should be able to open the folder having path as “Filepath”. os.startfile works perfect for opening a folder but I don’t know how to implement this inside some link.
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T00:37:53+00:00Added an answer on June 9, 2026 at 12:37 am

    Try to use URI with file: scheme like file:///C:/TestData/openfolder.html in your html:

    <a href="file:///C:/TestData/openfolder.html">Link to test data</a>
    

    Here is article on using file URIs in Windows.

    UPD (extraction from comments): Each browser has its own way to handle such urls. At least Internet Explorer 8 under Windows 7 opens links in Windows Explorer as was required by jags.

    Finally, for dynamic pages the web server is required. If one is needed take a look at discussion on creating simple web services using python.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried the following program for writing the contents into Spreadsheet. I downloaded
In the following program, loop is iterating 1000 times, and I am writing all
I am writing a simple hash tree structure in the following program hash_lookup.hs :
Normally when I am writing the perl program . I used to include following
A newbie question. I have the following piece of Java code: import acm.program.*; import
http://ruby-doc.org/stdlib-1.8.7/libdoc/net/http/rdoc/Net/HTTP.html After reading the doc very carefully, I'm writing the following code snippet for
I'm writing a cross-platform server program in C++ using Boost.Asio. Following the HTTP Server
I am writing the following command on command prompt C:/>C:\Program Files\WinRAR\rar.exe a c:\test.rar c:\test
Please consider the following problem. I'm writing a quick Manipulate[] program to display a
I'm writing a program that gets all directories and sub-directories. I'm using the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.