F5F Stay Refreshed Software Operating Systems [Fixed] How do I move up one step in a file path?

[Fixed] How do I move up one step in a file path?

[Fixed] How do I move up one step in a file path?

Pages (2): 1 2 Next
I
i3z___
Senior Member
559
03-27-2026, 01:14 AM
#1
TL;DR at bottom I want to make a “entertainment hub” on my Windows 11 PC. Consisting of Emulators and such. Everything is divided into subfolders, and I’m making shortcut icons to every single game and demos for easy and clean looking access. But i want to future proof this so that it will work IF i choose to change the drive letter on the disk it’s currently on, or rename mother folders, or if i give the project to someone, it needs to work without hickups. Folder structure right now is like this: F:\Folder1\Folder2\Subfolders (as many as needed, one for each emulator) F:\Folder1\Folder2\Icons F:\Folder1\Folder2\Shortcuts This shortcut folder is where every quick launch icon are located, they point towards the real place of what is to be executed. So one icon is specified to point towards F:\folder1\Folder2\Dreamcast\Games\SoulCalibur And each shortcut icon has it’s own customized icon that is located in F:\Folder1\Folder2\Icons The problem with future proofing is that this will only work properly if this is always installed on F: drive and the Folder1 and Folder2 name always stays the same. I am trying to find ways to circumvent this. One thing i tried was to change the path in the shortcut icon that is located in the F:\folder1\Folder2\shortcuts folder from “F:\Folder1\Folder2\Dreamcast\Games” to “..\Dreamcast\Games”. This method is not allowed it seems. I was hoping it would just go one step back from where it’s executed, and rest would work flawlessly, this would solve my problems. *But, it would NOT solve the customized Icons, they will disappear on reboot if the icons are not in the exact path i fetched them from. So since that didn’t work, i thought maybe i could make a direct link to where this is located by simply make a “drive” that points there. For example HUB: which goes directly to F:\Folder1\Folder2\ But in Windows you aren’t allowed to to do this, you can only use Drive letters A-Z. So i thought, well maybe i can just make a .BAT file with the command “subst Z: F:Folder1\” and let this .BAT file launch with Windows, at least i could make that part easier, but then again just having the entire project to always be on F: would be just as easy. Then again i tried this and even though i do use Z: the icons still have the path “F:\Folder1\Folder2\” So. Either i can go one step back in the Icon path, or i have will have to always have this located on F:\ or whatever drive i choose, better pick one far down on the list i guess just in case. Or i will have to make some sort of install script for this project that if i ever choose to move this around, the install script will properly change the path in every shortcut icon and move all the files to where they belong, but i have no programming skills and this sounded very workload heavy. Anyone has any idea on what i should do? TL;DR: Instead of a shortcut icon using full path e.g. "F:Folder1\Folder2\Folder3\" to the file's location. And since the shortcut is stored in: F:\Folder1\Folder2\Shortcuts is there some way that the path in the shortcut can go one step beck similar to CD.. command? So something like this: "..\Folder3\" instead of using full path like "F:\Folder1\Folder2\Folder3\"?
I
i3z___
03-27-2026, 01:14 AM #1

TL;DR at bottom I want to make a “entertainment hub” on my Windows 11 PC. Consisting of Emulators and such. Everything is divided into subfolders, and I’m making shortcut icons to every single game and demos for easy and clean looking access. But i want to future proof this so that it will work IF i choose to change the drive letter on the disk it’s currently on, or rename mother folders, or if i give the project to someone, it needs to work without hickups. Folder structure right now is like this: F:\Folder1\Folder2\Subfolders (as many as needed, one for each emulator) F:\Folder1\Folder2\Icons F:\Folder1\Folder2\Shortcuts This shortcut folder is where every quick launch icon are located, they point towards the real place of what is to be executed. So one icon is specified to point towards F:\folder1\Folder2\Dreamcast\Games\SoulCalibur And each shortcut icon has it’s own customized icon that is located in F:\Folder1\Folder2\Icons The problem with future proofing is that this will only work properly if this is always installed on F: drive and the Folder1 and Folder2 name always stays the same. I am trying to find ways to circumvent this. One thing i tried was to change the path in the shortcut icon that is located in the F:\folder1\Folder2\shortcuts folder from “F:\Folder1\Folder2\Dreamcast\Games” to “..\Dreamcast\Games”. This method is not allowed it seems. I was hoping it would just go one step back from where it’s executed, and rest would work flawlessly, this would solve my problems. *But, it would NOT solve the customized Icons, they will disappear on reboot if the icons are not in the exact path i fetched them from. So since that didn’t work, i thought maybe i could make a direct link to where this is located by simply make a “drive” that points there. For example HUB: which goes directly to F:\Folder1\Folder2\ But in Windows you aren’t allowed to to do this, you can only use Drive letters A-Z. So i thought, well maybe i can just make a .BAT file with the command “subst Z: F:Folder1\” and let this .BAT file launch with Windows, at least i could make that part easier, but then again just having the entire project to always be on F: would be just as easy. Then again i tried this and even though i do use Z: the icons still have the path “F:\Folder1\Folder2\” So. Either i can go one step back in the Icon path, or i have will have to always have this located on F:\ or whatever drive i choose, better pick one far down on the list i guess just in case. Or i will have to make some sort of install script for this project that if i ever choose to move this around, the install script will properly change the path in every shortcut icon and move all the files to where they belong, but i have no programming skills and this sounded very workload heavy. Anyone has any idea on what i should do? TL;DR: Instead of a shortcut icon using full path e.g. "F:Folder1\Folder2\Folder3\" to the file's location. And since the shortcut is stored in: F:\Folder1\Folder2\Shortcuts is there some way that the path in the shortcut can go one step beck similar to CD.. command? So something like this: "..\Folder3\" instead of using full path like "F:\Folder1\Folder2\Folder3\"?

J
jon371
Junior Member
41
03-27-2026, 09:17 AM
#2
For now, I'm just using a simple tool called Link Fixer to fix all shortcut paths inside a folder at once. I don't know what icons I picked but it works fine anyway. It's a fast and easy way to do it. Let's put this on the C drive. EDIT: Wow, that also fixes the icons! So the problem is gone. EDIT 2: Turns out shortcuts update themselves automatically when you double-click them after changing their name or moving them somewhere else. I didn't know Windows had this feature built in. Thanks for helping me with Ralston18
J
jon371
03-27-2026, 09:17 AM #2

For now, I'm just using a simple tool called Link Fixer to fix all shortcut paths inside a folder at once. I don't know what icons I picked but it works fine anyway. It's a fast and easy way to do it. Let's put this on the C drive. EDIT: Wow, that also fixes the icons! So the problem is gone. EDIT 2: Turns out shortcuts update themselves automatically when you double-click them after changing their name or moving them somewhere else. I didn't know Windows had this feature built in. Thanks for helping me with Ralston18

2
2ciniseb2
Junior Member
42
04-03-2026, 03:17 PM
#3
Maybe Path and Environmental Variables. When you create a shortcut, you give it the name of the place (like drive or folder) where it runs. Then, tell PowerShell exactly which string to use in that place so the command knows where to find it. Later if you need the path changed, just edit that same string definition instead of messing with shortcuts again. Keep the exact name on the file. Here is a starting point: https://poshcode.gitbook.io/powershell-f...-variables https://petri.com/powershell-set-environment-variable/ You can Google more ideas if needed.
2
2ciniseb2
04-03-2026, 03:17 PM #3

Maybe Path and Environmental Variables. When you create a shortcut, you give it the name of the place (like drive or folder) where it runs. Then, tell PowerShell exactly which string to use in that place so the command knows where to find it. Later if you need the path changed, just edit that same string definition instead of messing with shortcuts again. Keep the exact name on the file. Here is a starting point: https://poshcode.gitbook.io/powershell-f...-variables https://petri.com/powershell-set-environment-variable/ You can Google more ideas if needed.

J
JeyBeyyy
Junior Member
41
04-05-2026, 11:07 AM
#4
Every folder is called its parent by a special name, "..". If you type "CD .." (Change Directory), it will always take you one step back up the path. Because I don't know what problem you're having or how your shortcuts are set up, that's all I can say for sure about.
J
JeyBeyyy
04-05-2026, 11:07 AM #4

Every folder is called its parent by a special name, "..". If you type "CD .." (Change Directory), it will always take you one step back up the path. Because I don't know what problem you're having or how your shortcuts are set up, that's all I can say for sure about.

H
HerrBioLehrer
Member
51
04-05-2026, 12:07 PM
#5
I just want to know how to navigate back up one level in the path string that's inside an icon. The icon shows where the shortcut file is, but it uses full paths instead. I need to go up one folder and then into the right spot. If I can figure out a path like this, I never have to worry about renaming old folders or moving everything to a whole new drive with a different letter.
H
HerrBioLehrer
04-05-2026, 12:07 PM #5

I just want to know how to navigate back up one level in the path string that's inside an icon. The icon shows where the shortcut file is, but it uses full paths instead. I need to go up one folder and then into the right spot. If I can figure out a path like this, I never have to worry about renaming old folders or moving everything to a whole new drive with a different letter.

T
Toe987
Junior Member
43
04-23-2026, 10:54 PM
#6
I searched online for a way to fix this problem and couldn't find it. The ideas I found don't work either. Then I started making names that look like drive letters, such as "HappyPlace:" which tries to assign directly into the right folder. But that's not possible because you can only use drive letters on Windows. So then I thought about making a .bat file that runs with windows and assigns a drive letter, for example using "subst X: F:\elsewhere\Happyplace" in CMD. Then I have to create another .BAT file that executes with every startup of the windows. If I want to move this folder or change the drive letter later, I can use this method. But even if you USE the X: to get to the right folder, the icon will still show the full path like F:\elsewhere\happyplace instead of just X:.
T
Toe987
04-23-2026, 10:54 PM #6

I searched online for a way to fix this problem and couldn't find it. The ideas I found don't work either. Then I started making names that look like drive letters, such as "HappyPlace:" which tries to assign directly into the right folder. But that's not possible because you can only use drive letters on Windows. So then I thought about making a .bat file that runs with windows and assigns a drive letter, for example using "subst X: F:\elsewhere\Happyplace" in CMD. Then I have to create another .BAT file that executes with every startup of the windows. If I want to move this folder or change the drive letter later, I can use this method. But even if you USE the X: to get to the right folder, the icon will still show the full path like F:\elsewhere\happyplace instead of just X:.

X
xOtashi
Junior Member
49
04-24-2026, 08:10 PM
#7
I need to make sure I know what you are asking for. You want me to get the executable files that are now in places like: "F:\Elsewhere\HappyPlace\psx\other folders or files", "F:\Elsewhere\HappyPlace\dreamcast\other folders or files", and "F:\Elsewhere\HappyPlace\commodor64\other folders or files". My goal is to move the stuff inside those folders up into the psx, dreamcast, commodore64 folder levels. With all the shortcut icons and current paths saved in "F:\Elsewhere\HappyPlace\Shortcuts", without me having to change each file path one by one using my shortcuts (which is what you underlined). Do I get that right? If not, give me a couple of examples with full paths for both the files and inside the shortcuts so I can see how it works. Two main things: 1) The current full folder list from the hard drive down here. 2) The new or needed full folder list from the hard drive down here. Moving files is risky. Moving is one thing, changing the directory (CD) at @Nigel Spike's suggestion is another. The process I have in mind will probably need both of those actions. And then some... For example, Go to a subfolder, copy a file, change directories up one step, and maybe paste the file back over the original. [This isn't the solution, just an example.] The main point is to understand how Part 1 above differs from Part 2 above very carefully. Do not start anything until you have full backups of all files being moved around. As for " I only need to know how to go one step back inside a path string inside an icon," the icon tells me where the shortcut file is located. But it does so with full path names. Very sure that this will take some heavy work to capture the original path string, parse it to edit out the intervening subfolders ("one level back") and then save the new edited path name into the shortcut. And that edit will include putting strings in there so if the string is changed (because the files were moved again), all the shortcut paths included that string will show that change. = = = = "Get-ChildItem -Path "F:\Elsewhere\HappyPlace\WinUAE\Autorun Configurations" -Recurse | %{$_.FullName} Reference = https://java2blog.com/powershell-get-full-path-of-file/"
X
xOtashi
04-24-2026, 08:10 PM #7

I need to make sure I know what you are asking for. You want me to get the executable files that are now in places like: "F:\Elsewhere\HappyPlace\psx\other folders or files", "F:\Elsewhere\HappyPlace\dreamcast\other folders or files", and "F:\Elsewhere\HappyPlace\commodor64\other folders or files". My goal is to move the stuff inside those folders up into the psx, dreamcast, commodore64 folder levels. With all the shortcut icons and current paths saved in "F:\Elsewhere\HappyPlace\Shortcuts", without me having to change each file path one by one using my shortcuts (which is what you underlined). Do I get that right? If not, give me a couple of examples with full paths for both the files and inside the shortcuts so I can see how it works. Two main things: 1) The current full folder list from the hard drive down here. 2) The new or needed full folder list from the hard drive down here. Moving files is risky. Moving is one thing, changing the directory (CD) at @Nigel Spike's suggestion is another. The process I have in mind will probably need both of those actions. And then some... For example, Go to a subfolder, copy a file, change directories up one step, and maybe paste the file back over the original. [This isn't the solution, just an example.] The main point is to understand how Part 1 above differs from Part 2 above very carefully. Do not start anything until you have full backups of all files being moved around. As for " I only need to know how to go one step back inside a path string inside an icon," the icon tells me where the shortcut file is located. But it does so with full path names. Very sure that this will take some heavy work to capture the original path string, parse it to edit out the intervening subfolders ("one level back") and then save the new edited path name into the shortcut. And that edit will include putting strings in there so if the string is changed (because the files were moved again), all the shortcut paths included that string will show that change. = = = = "Get-ChildItem -Path "F:\Elsewhere\HappyPlace\WinUAE\Autorun Configurations" -Recurse | %{$_.FullName} Reference = https://java2blog.com/powershell-get-full-path-of-file/"

M
MeMan
Junior Member
4
04-24-2026, 08:23 PM
#8
Hey thanks for your reply. I updated my OP before you answered, but it looks like you missed that change (because of using old folder names), now my stuff is clearer to me. Right here are where my files are: F:\Folder1\Folder2\Dreamcast, F:\Folder1\Folder2\Amiga, F:\Folder1\Folder2\C64, F:\Folder1\Folder2\PSX, F:\Folder1\Folder2\Dragon32, F:\Folder1\Folder2\Shortcuts, and F:\Folder1\Folder2\Icons. Inside those folders are all the installed emulators; if I want to copy these to another computer later, they will need to be set up from scratch because Windows doesn't know where an .UAE file lives unless it is in a specific spot inside the emulator folder itself. All software, demos, and games go into their own little folders within each emulator folder. So everything is already organized exactly where it needs to be. But since I want a clean way to run everything without opening one emulator and then switching to another, I made shortcuts for all of them and put those in the Shortcuts folder. The icons have paths like "F:\Folder1\Folder2\*Emulator*". That could get messy if my drive letter changes from F: to E:, then I'd have to open every single icon manually and change the path each time. There are hundreds of shortcuts, but I also found another issue: even if I fix that shortcut problem, the customized icons will become a new bigger problem. I didn't notice this until I restarted my PC. Because I want it to look clean, I added custom icons for every demo and game next to those shortcuts, but if those icons are not in exactly the same spot as before when I put them there, they won't work after a restart anymore, so that's another problem. Right now, this only works fine if I always use the exact same drive letter (like F: to the end of every shortcut). As long as I never rename the folders, it is all good.
M
MeMan
04-24-2026, 08:23 PM #8

Hey thanks for your reply. I updated my OP before you answered, but it looks like you missed that change (because of using old folder names), now my stuff is clearer to me. Right here are where my files are: F:\Folder1\Folder2\Dreamcast, F:\Folder1\Folder2\Amiga, F:\Folder1\Folder2\C64, F:\Folder1\Folder2\PSX, F:\Folder1\Folder2\Dragon32, F:\Folder1\Folder2\Shortcuts, and F:\Folder1\Folder2\Icons. Inside those folders are all the installed emulators; if I want to copy these to another computer later, they will need to be set up from scratch because Windows doesn't know where an .UAE file lives unless it is in a specific spot inside the emulator folder itself. All software, demos, and games go into their own little folders within each emulator folder. So everything is already organized exactly where it needs to be. But since I want a clean way to run everything without opening one emulator and then switching to another, I made shortcuts for all of them and put those in the Shortcuts folder. The icons have paths like "F:\Folder1\Folder2\*Emulator*". That could get messy if my drive letter changes from F: to E:, then I'd have to open every single icon manually and change the path each time. There are hundreds of shortcuts, but I also found another issue: even if I fix that shortcut problem, the customized icons will become a new bigger problem. I didn't notice this until I restarted my PC. Because I want it to look clean, I added custom icons for every demo and game next to those shortcuts, but if those icons are not in exactly the same spot as before when I put them there, they won't work after a restart anymore, so that's another problem. Right now, this only works fine if I always use the exact same drive letter (like F: to the end of every shortcut). As long as I never rename the folders, it is all good.

T
233
04-25-2026, 04:10 AM
#9
You need to set up some file paths using special strings. Here is how I thought about it before looking at all the rules for folders: How did we write these string variables? We must use PowerShell, not Windows Command Line. What happens when you run Get-Variable (without quotes and with admin rights)? What are the results of $Env ath? What do dir env show? What does Get-ChildItem -Path "F:\Elsewhere\HappyPlace\WinUAE\Autorun Configurations" -Recurse | %{$_.FullName} tell you? Just get a feel for what PowerShell can say about drives, folders, and subfolders. = = = = Another tip: https://petri.com/powershell-set-environment-variable/ For example, take the path F:\Folder1\Folder2\Icons and set that as a string. Put this string into shortcut names. If the drive changes from "F:" to "N:", edit the string to match. Focus on making just one simple variable or path. Create a pathname string for one specific test file. Make sure the shortcut works. Move the test file. Then change that pathname string to point to where the new test file is now located. Test the shortcut again to see if it finds the file in its new place. If not, what errors appear... Start simple and understand how strings work so you can use them. Define a string for one drive with a folder on that drive. Then change that string to point at another drive and a different folder. Remember: always test and experiment on copies of drives or folders, far away from the original files.
T
TrainerGriffin
04-25-2026, 04:10 AM #9

You need to set up some file paths using special strings. Here is how I thought about it before looking at all the rules for folders: How did we write these string variables? We must use PowerShell, not Windows Command Line. What happens when you run Get-Variable (without quotes and with admin rights)? What are the results of $Env ath? What do dir env show? What does Get-ChildItem -Path "F:\Elsewhere\HappyPlace\WinUAE\Autorun Configurations" -Recurse | %{$_.FullName} tell you? Just get a feel for what PowerShell can say about drives, folders, and subfolders. = = = = Another tip: https://petri.com/powershell-set-environment-variable/ For example, take the path F:\Folder1\Folder2\Icons and set that as a string. Put this string into shortcut names. If the drive changes from "F:" to "N:", edit the string to match. Focus on making just one simple variable or path. Create a pathname string for one specific test file. Make sure the shortcut works. Move the test file. Then change that pathname string to point to where the new test file is now located. Test the shortcut again to see if it finds the file in its new place. If not, what errors appear... Start simple and understand how strings work so you can use them. Define a string for one drive with a folder on that drive. Then change that string to point at another drive and a different folder. Remember: always test and experiment on copies of drives or folders, far away from the original files.

C
Commando__
Senior Member
744
04-25-2026, 06:57 PM
#10
Ok thanks. When I write strings it feels like I opened Pandora's box or something. Yeah, I didn't really know what to call that path thingy. I need to look into this, i have actually never done anything about the stuff you just wrote. I need to test things. I feel I'm getting very close to give this project a Drive letter and never ever change it lol. 😂
C
Commando__
04-25-2026, 06:57 PM #10

Ok thanks. When I write strings it feels like I opened Pandora's box or something. Yeah, I didn't really know what to call that path thingy. I need to look into this, i have actually never done anything about the stuff you just wrote. I need to test things. I feel I'm getting very close to give this project a Drive letter and never ever change it lol. 😂

Pages (2): 1 2 Next