Windows relative path in shortcut




















The standard folder icon will probably be in the lower right-hand corner. Now you can copy this file and just change the "Start in:" directory to make new relative shortcuts. NOTE: The above steps are just an example hence try this at your own risk.

And check if it works. Visit our Microsoft Answers Feedback Forum and let us know what you think. Was this reply helpful? Yes No. Sorry this didn't help. Thanks for your feedback. Hi All, I'm Linux user so I don't have enough experience to fix this issue. You can use this utility: Relative. It basically creates a shortcut to "explorer. Of course you can do this manually.

One possible solution is use a one line batch file instead of a short cut to open whatever you wanted to open. The batch file will let you use relative paths inside itself and will have a working directory of whatever folder the batch file is placed in.

Another option is have your shortcut start cmd. I can pass arguments to my bat script and etc. You can use mklink. It allows you to create symbolic links, hard links and directory links. To move around the whole structure you should use the xcopy command. For example, if all the structure is under container :. A shortcut can record it's location in a variable and call a command using the variable. For example, create the shortcut "Grandparent" with target:.

Now, whatever folder Grandparent is in, when you click it, the parent of its parent folder opens. It even works with Grandparent in a root directory. Or instead of Here. If you leave the 'Start In' box empty in the properties of the Shortcut, the links be relative to the current working directory.

You can create an environment variable that contains the relative Path to the target folder or a folder above it in the file system structure. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Using relative paths for Windows shortcuts Ask Question.

Asked 8 years, 4 months ago. Active 1 year, 11 months ago. Viewed k times. Improve this question. Gary Morris Gary Morris 1 1 gold badge 6 6 silver badges 5 5 bronze badges. Did you try.. I'm not running Windows but I think it may work. What's needed here is a way to refer to a folder instead. One of them stackoverflow. I did not try it. Another one stackoverflow. You even commented on that one. I tried it and it works. It is not necessary to be thorough to place a comment, but one should try not to mislead readers.

Active 2 years, 1 month ago. Viewed 32k times. To create a shortcut with a relative path, set the target to the following. Is there any way to make a shortcut that is both relative and run as admin?

Improve this question. Trevor Merrifield Trevor Merrifield 4, 2 2 gold badges 19 19 silver badges 23 23 bronze badges. Add a comment. Active Oldest Votes. Improve this answer. This is confirmed to work in Win10 Credit: some other post on stackoverflow a while ago. I tried this with Target and Start In blank, with a. I'm looking for a way to run a. Was having trouble with auto-close window behavior. Sign up or log in Sign up using Google.

Sign up using Facebook. Sign up using Email and Password.



0コメント

  • 1000 / 1000