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 7902453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:29:49+00:00 2026-06-03T09:29:49+00:00

I have a different links in my page like, <a href=../test.url>Open</a> now when I

  • 0

I have a different links in my page like,

<a href="../test.url">Open</a>

now when I click on this link, i get a *.url file in text mode.
I found that URL files has different formats as http://www.cyanwerks.com/file-format-url.html
show is there any easy way to fetch the target path from this text?

I know it is just simple string manipulation but is there any easy way to parse it which can work for cross-platform URL shortcut files?

  • 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-03T09:29:51+00:00Added an answer on June 3, 2026 at 9:29 am

    As you can see that URL file having same format as .ini file (key/value pair).
    http://www.cyanwerks.com/file-format-url.html

    If you are running your application in Desktop Application then, the files can be manipulated using basic file I\O or the GetPrivateProfileString, GetPrivateProfileSection, WritePrivateProfileSection, WritePrivateProfileSring API functions provided by Windows.

    If you want to manually parse it and you having whole file content as one string only then i prefer you to follow below method:

    private String getUrl(String fileContent) {
        fileContent = fileContent.trim();
        String[] contentList = fileContent.split("\r\n");
        for (String content : contentList) {
            if (content.toUpperCase().startsWith("URL")) {
                int i = content.indexOf("=");
                return content.substring(i + 1);
            }
        }
    

    }

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

Sidebar

Related Questions

I have some internal link which shows different content. Everytime I click the internal
I have a page with HTML like this: <a>text</a> <img src=image.png /> <a>text</a> I
I have a website's page with a menu that links to different divs ,
In Spring 3.0 if i have a jsp page with two different links each
I just can't find a solution to this... I have several dynamic page links
i have one image in my html and i have 5 different link, i
We have couple different web-apps that share the same db link. The hibernate layer
I have a link which return form with different ID's, and i need to
I have the following case: Edited: removed link In IE7 gives me different view
I have different php output in jQuery-based tabs. This output is formed from database

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.