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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:21:37+00:00 2026-06-14T07:21:37+00:00

Windows native alternative for ln -s is mklink . Is there any native alternative

  • 0

Windows native alternative for ln -s is mklink.

Is there any native alternative for readlink? Or how to natively identify if the file is symlink?

  • 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-14T07:21:38+00:00Added an answer on June 14, 2026 at 7:21 am

    I don’t believe there’s any tool directly equivalent to readlink. But you can see in the output of dir whether an item is a symlink or not, so you can still determine this from the command line or in a script.

    Test whether it’s a symlink or not

    You can pretty easily test whether a given file is a symlink using syntax like:

     dir mysymlink  | find "<SYMLINK>" >NUL
     if not errorlevel 1  echo. It's a symlink!
    

    Errorlevel will be 0 in the case that “<SYMLINK>” is found, and will be 1 otherwise.

    Determine the target of a symlink

    Determining the actual target of the symlink is another matter, and in my opinion not as straight-forward. The output of dir mysymlink | find "<SYMLINK>" might look like

    11/13/2012  12:53 AM    <SYMLINK>      mysymlink [C:\Windows\Temp\somefile.txt]
    

    You can parse this, but some of the characters make it difficult to deal with all in one variable, so I found it easier to deal with a temporary file:

     dir mysymlink | find "<SYMLINK>" > temp.txt
     for /f "tokens=6" %i in (temp.txt) do @echo %i
    

    This yields output like [C:\Windows\Temp\somefile.txt]. (Remember to use %%i within any batch scripts; the above is from the command prompt.)

    To get the result without the brackets, you can do something like:

     dir mysymlink | find "<SYMLINK>" > temp.txt
     for /f "tokens=6" %i in (temp.txt) do set answer=%i
     echo %answer:~1,-1%
    

    The variable %answer% contains the result with the brackets, so %answer:~1,-1% is the result without the first or the last character.

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

Sidebar

Related Questions

Is there any free native Windows DLL export functions viewer, which shows the function
how can I catch all strings from a native windows .exe file and replace
Is there a way to create windows like the native Windows 7 notification area
Is there a Windows native API analogous to pthread_cancel, pthread_testcancel etc? If not, how
Some Windows native applications have a question mark icon on the title bar. It's
We have Win Forms application uses the 3rd party windows native controls. Can these
Do we still need to bother with vcredist.exe when distributing windows native applications ?
I read that Windows wp8 allows native code. So how then have ports such
Various native applications in Windows Phone 7 (Hotmail, Gmail, etc.) seem to be able
Can I create a native thread on Windows running MRI, using the CreateThread API

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.