Request relative paths

Suggestions and feature requests.
Locked
Message
Author
animeaime
Posts: 8
Joined: 28.10.2008, 00:38

Request relative paths

#1 Post by animeaime » 28.10.2008, 01:07

Is there a way to allow paths to be relative?

For example, I use folders that are on my USB drive (which is where I run FreeCommander from), is there a way to define a tab to use Relative paths so that if my drive letter changes (from D: to E:, for example), then I still have my active tabs set to the right folder.

Is there a way to use the built-in environment variable, %FcSrcDrive%, to do this? I use it currently to point to my programs I used to edit files.

Or, this could be done perhaps by checking each drive for the "active folder", and opening (in separate tabs) each drive with the given folder (in rare case when a given folder appears on multiple drives, and thus the intended drive cannot be known). This way, the intended drive can be kept, and others optionally closed.

Of course, other ways may be done to allow the program to "guess" which drive was the requested drive. Also, the program might want to say if the drive is a hard drive, flash drive, CD/DVD drive (if possible). This way, one doesn't need to check, for example, the local drive for the viewed folder if it is known to have been opened on a flash drive.

Another way would include storing the list of files/folders in the viewed directory and checking that a "majority" (some percent) where in the given folder on a specific drive. For example, if I have a folder on my USB drive D:\test and D: is known to be a removable drive (tested by the program, or user set as relative), and I load FreeCommander on a computer where my flash drive is now E:, it could check the contents of E:\test against the stored folders/files to see if the two lists are "similar" and thus "could" be referring to the same path. Testing for identical file lists will pose problems if any folder/file is renamed, moved, or deleted (or files are added). This is why a "similarity" test could be used. Just some suggestions.

If this is not possible, is there an option (whether currently in use, or to be added), to prevent the program from closing "invalid" tabs when the tab is selected?

For example, if I have E: on a tab, but my flash drive is now for D:, I would want the tab to remain open even though E: is "invalid".

Thank you for your time and any response. You can email me at crossthei.thet@gmail.com with any questions or for further inquiry.

User avatar
Dreamer
Site Admin
Posts: 3681
Joined: 19.08.2007, 21:40
Location: Slovakia

#2 Post by Dreamer » 28.10.2008, 01:42

You can define a fixed drive letter for your USB drive in Windows. Press Win+R, type diskmgmt.msc and press Enter. Then right click the USB drive and select "Change drive letter and paths" > "Change...".

animeaime
Posts: 8
Joined: 28.10.2008, 00:38

#3 Post by animeaime » 28.10.2008, 03:17

I jump between the school computers, my home computer, and the computer lab computers on campus. Also, I don't have admin rights (except on my computer). Also, I don't use the same school computer each time...so, yeah.

It would be awesome if FreeCommander supported relative paths - it's the next step, since it's already portable. Plus, it's an awesome program, it can do anything :D

phool
Posts: 6
Joined: 11.03.2008, 10:50

#4 Post by phool » 29.01.2009, 07:26

Edit: Should have read the first post properly :oops: My "solution" I posted earlier seems to have not worked for you (i.e. using %FcSrcDrive%).

granny
Posts: 111
Joined: 03.12.2007, 03:46

#5 Post by granny » 16.04.2009, 04:24

Try a batch file.
I made a bat file using the subst command, that I put on the root of my usb drive, and run it whenever I move onto a different computer.
After you run the bat file to assign your special drive letter, you can assign your tabs and shortcuts in FC. On the next computer, run the bat file to assign that same drive letter again, and all the FC paths will point to that drive letter.

This works on every XP computer I've tried, and on my home computer, running Vista.

You can use whatever vacant drive letter you want.
Your usb drive will show up both under the letter that Windows assigns, and the one that you assign with the bat file.

I chose the letter Y for drive letter, because I am fairly certain no computer I use will have that drive letter already in use. If it does, I just have to suffer.

If you've never done batch files, here is how to do this one.
In Notepad, type the following

#### EDIT CORRECTION TO TYPO --
On the first line, there must be a space after colon before the backslash, that tells the bat file to use relative path.. So Sorry!

Code: Select all

subst.exe Y: \
cd Y:\
Save as filetype "all files" and use extension .bat; I used YGo.bat.

Just double-click on the .bat file to run it. (right click it if you want to Edit it)

When you are finished using that particular computer, you should run another bat file to disable your special drive letter, otherwise Windows will complain that drive "Y" is unavailable

Again, in Notepad, type the following and save as a .bat file. This deletes the drive letter Y. I named mine YStop.bat.

Code: Select all

subst.exe /d Y:
You need to copy the little 9KB subst.exe from Windows\System32 folder to the root of your usb drive, along with your batch files.


I don't know if FC or any file manager can ever truly support relative paths, but using the Subst batch file is the next best thing for me.

paciuli
Posts: 21
Joined: 04.05.2009, 08:10

#6 Post by paciuli » 25.05.2009, 09:23

I second this request, particularly for command line parameters (I use PStart, in which i have some FC shortcuts to open certain folders on my USB drive, which frequently changes letter though, so those shortcuts won't always work). In other words, I'd like it to be

/C /L=%FcSrcDrive%

instead of

/C /L=E:\

Thanks :wink:

Locked

Who is online

Users browsing this forum: No registered users and 4 guests