Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: shared IL2s files,folders? - use Symbolic-Links  (Read 10513 times)

0 Members and 1 Guest are viewing this topic.

SAS~Gerax

  • SAS Team
  • member
  • Offline Offline
  • Posts: 4766
shared IL2s files,folders? - use Symbolic-Links
« on: May 24, 2013, 03:38:39 AM »

It all started with a reply by Storebro to Malone when we discussed something in the Beta forum.

Quote
sharing one 'master' paintschemes folder with other installs
Actually you can share whatever you like with other installs as long as the file system you're using for your installation is NTFS.
In that case you can easily create Symbolic Links which point to some folder from several other game installations.

Example:

You've got two IL-2 Installations, one at "D:\IL2\MyFirstIl2Installation", another one at "D:\IL2\MySecondIl2Installation".
You create a shared folder "D:\IL2\Shared Files".
Now you want to share the "Paintschemes" folder. To do so, create a folder "Paintschemes" in "D:\IL2\Shared Files", so you have a folder "D:\IL2\Shared Files\Paintschemes".
Next you copy/merge the files from both "D:\IL2\MyFirstIl2Installation\Paintschemes" and "D:\IL2\MySecondIl2Installation\Paintschemes" into "D:\IL2\Shared Files\Paintschemes".
Then you delete both folders "D:\IL2\MyFirstIl2Installation\Paintschemes" and "D:\IL2\MySecondIl2Installation\Paintschemes".
Now you open a command prompt (click Windows Start button, enter "cmd" (without double quotes) and press Enter/Return).
At the command prompt enter the following commands, line by line, each line ends with pressing Enter/Return key (note that the path names are from the samples above, adjust them to your needs):
Code: [Select]
D:
cd \IL2
cd MyFirstIl2Installation
mklink /D Paintschemes "D:\IL2\Shared Files\Paintschemes"
cd ..
cd MySecondIl2Installation
mklink /D Paintschemes "D:\IL2\Shared Files\Paintschemes"

Voilá, now both installations share the same "Paintschemes" folder. This works with any other folder/file as well.

In case you're afraid to use the command prompt, you can use third party tools which are capable of creating NTFS symbolic links as well, e.g. Link Shell Extension.

Best regards - Mike

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


I use this "method" for years now and had no problems
apart from a few mistakes made by me.  :)
I share my skins folder (very large) or others like the "samples" folder
with several Il2 different installs. Within ie my MA 4.12.2 directory
I share the XTD folder, planes, ships etc ... this all is possible.

And more, I even share some SFS files with different IL2 installs!
This means, the claymores_190 or the jetwar_SFS files
are stored physically only one time, but I share them seperate installs...  ;D
and last not least I have the basic SFS files from stock Il2
only once but share it with my three Il-2 installs I have atm.
you can imagine how many HD space is spared ..

the secret is: when you know what a ordinary file link is you know
that there is a bad disadvantage: this files with the little white arrow
on their icon aren't useable with IL2!   :(

But with "Symbolic Links" it works!!!!!!! My several Il-2 installs "reads"
 and "executes" them as they were files and/or folders which
are physically present ... although they come from only
one "master" folder wich is NOT in the IL2 folders
but somewhere on my HD ..!  ;)

example one: shared sfs files (in XP named "hardlinks"):
(note the red arrow on the icons!,
this indicates them as hardlinks/junctions)



this are so called hardlinks, files wich I share from
a master folder into the root of my IL2 installs.

example 2: shared folders: (in XP named "junctions"):



here you see the several shared planes skins folders within
one of my paintscheme skins folders .. (note: I have not shared
the whole skin folder "in one piece" because I wanted
to have it more flexible.) And of course you can share the bmp files
within the several planes skins folders .. so I have all the bf-109E4 skins
shared into my 109E7 folder via hardlinks! etc.

note also the shared samples folder.

The same here in example 3, my shared maps folder:



all what you see with a red arrow on the icon is stored phyically
only once within one master folder.
 
and the next big advatage is: I have to do all my install,
reinstall work there only for one time!
!!!!!!!
This means when overwriting a static.actors witha patched one
in my master folders XXX maps folder this is automaticaly reckoned
in all the shared junctions folders then, I must not take care for them.

Now you will understand why one of my "mods" folders looks
like this in my installs:



of course I share planes (and other folders), I install them only once
in the master folder, there I upgrade etc. them and share them
whereever I need them!

My advice is: Try first with dummy folders/files before doing
something within IL2 but at least try this, you will love it.  :)

Ah, I forgot: to share ie all planes-skins folders out
of my master skin folder into a new fresh empty skin folder
happens in only 5 seconds with a simple "select all/drag/drop action!
Now remember how long you will wait when copying them ..  ;D

looks like this:
with this (new when you have installed Link Shell Extension) command:



I drag and drop

and the result is this (note the properties
0 bytes of my skins directory):




Try it.   ;)

To see how to do this all with "Symbolic Links" go here:
https://www.sas1946.com/main/index.php/topic,62718.0/topicseen.html

Some useful links:
http://en.wikipedia.org/wiki/NTFS_symbolic_link
http://en.wikipedia.org/wiki/Hard_link


Here is the SW which provides a easy usage
for all mentioned above:
  ;)
http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html


Logged
i7-13700K, MSI RTX4090, Kingston 64GB, Asus Z790-P, Crucial SSD 1TB, Kingston SSD 4TB;

Gaston

  • Modder
  • member
  • Offline Offline
  • Posts: 3252
Symbolic Links/Junctions/Hardlinks
« Reply #1 on: May 24, 2013, 03:56:48 AM »

Interesting ! Will try to do so. Little question : this works, even if one my install is still in version 2.04 (FB + AEP only) ?

Also, I use IL-2 Mat Manager on my main install... it creates files in it for national markings and numberings. Will this also be shared with the other installs ? if so... it would be just fantastic !
Logged

SAS~Gerax

  • SAS Team
  • member
  • Offline Offline
  • Posts: 4766
Symbolic Links/Junctions/Hardlinks
« Reply #2 on: May 24, 2013, 04:03:50 AM »

Interesting ! Will try to do so. Little question : this works, even if one my install is still in version 2.04 (FB + AEP only) ?
simply try it with for example one SFS file (make a backup before!!!).
move this file into a folder somewhere on your HD and make a hardlink into your root
and start Il2 then ...

Quote
Also, I use IL-2 Mat Manager on my main install... it creates files in it for national markings and numberings. Will this also be shared with the other installs ? if so... it would be just fantastic !
the same as above. try it!

In both cases I say it will work, but you you have to learn how to use it by yourself as you have to do the organisation how you use it then by yourself. And this knowledge comes when you begin with some testing.  ;)
Logged
i7-13700K, MSI RTX4090, Kingston 64GB, Asus Z790-P, Crucial SSD 1TB, Kingston SSD 4TB;

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23878
  • Taking a timeout
    • STFU
Re: Symbolic Links/Junctions/Hardlinks
« Reply #3 on: May 24, 2013, 05:49:59 AM »

Thanks for putting this into a dedicated topic Gerhard! :)
Let me just add that from a filesystem's point of view one should use symbolic links instead of hardlinks/junctions as much as possible, for that symbolic links can be removed/overwritten like any other file/folder without changing the "original" file/folder's content (you usually don't want that to happen).
Another thing is that in case you're storing your "common" files/folders on different volumes (drives) or even network paths, you have to use symbolic links anyway.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

just champi

  • Modder
  • member
  • Offline Offline
  • Posts: 608
Re: Symbolic Links/Junctions/Hardlinks
« Reply #4 on: May 24, 2013, 07:03:36 AM »

Very helpful and interesting, thanks for the explanations, my hard drives will be very pleased!  :)
Logged

Gaston

  • Modder
  • member
  • Offline Offline
  • Posts: 3252
Re: Symbolic Links/Junctions/Hardlinks
« Reply #5 on: May 24, 2013, 07:16:34 AM »

Let's make it clear, because Englishj is not my laguage, and tis a little bit too technical for me.

To create a cmd file, I can just create txt file, with no name on it, and then fill it wirh :

Quote
E:
cd \IL2
cd MixedModAct
mklink /E Paintschemes "E:\IL2\Shared Files\Paintschemes"
cd ..
cd IL-2 Sturmovik 1946 /E Paintschemes "E:\IL2\Shared Files\Paintschemes"
(my games are in E:)

then close it, rename it .cmd instead of .txt, put it in my game(s) and it will work ?
Logged

SAS~Gerax

  • SAS Team
  • member
  • Offline Offline
  • Posts: 4766
Re: Symbolic Links/Junctions/Hardlinks
« Reply #6 on: May 24, 2013, 08:15:28 AM »

Let me just add that from a filesystem's point of view one should use symbolic links instead of hardlinks/junctions as much as possible

Sadly in XP (oh yes I use this as I was too lazy to do the win7 upgrade finally, brrrr  :P) there are no symbolic links, they come with Win7, in XP there are junctions and hardlinks only.

As a example I have to be very careful when deleting a folder .. when its a junction I must use this function from the folders drop down menu instead simply deleting:

but, as said above, this is necessary with junctions in XP.

also you should not rename the folders you have shared via junction in the master folder...then the junction will not find its originator. But its possible to rename the junctions folders names.

But from my experience this are the only serious restrictions I had to learn, when always remembering them this files system "expansions" works like a charm.  :)
Logged
i7-13700K, MSI RTX4090, Kingston 64GB, Asus Z790-P, Crucial SSD 1TB, Kingston SSD 4TB;

SAS~Gerax

  • SAS Team
  • member
  • Offline Offline
  • Posts: 4766
Re: Symbolic Links/Junctions/Hardlinks
« Reply #7 on: May 24, 2013, 08:22:06 AM »

Let's make it clear, because Englishj is not my laguage, and tis a little bit too technical for me.

from above:
Quote
In case you're afraid to use the command prompt, you can use third party tools which are capable of creating NTFS symbolic links as well, e.g. Link Shell Extension.

download this, it will make it a lot more comfortable for you.  ;)
Logged
i7-13700K, MSI RTX4090, Kingston 64GB, Asus Z790-P, Crucial SSD 1TB, Kingston SSD 4TB;

Gaston

  • Modder
  • member
  • Offline Offline
  • Posts: 3252
Re: Symbolic Links/Junctions/Hardlinks
« Reply #8 on: May 24, 2013, 10:14:56 AM »

You are probably right, Gerax... this tool may be better... I just have a problem : I run Win XP, but I do not know if it is XP 64 bit, or normal XP... Yeah, I know... I look quite stupid here ! How do I know this ?

This is what says my information system :

Code: [Select]
Élément Valeur
Système d'exploitation Microsoft Windows XP Édition familiale
Version 5.1.2600 Service Pack 3 Nu 2600
Éditeur Microsoft Corporation
Ordinateur THIERRY
Fabricant Gigabyte Technology Co., Ltd.
Modèle EP45-DS3R
Type X86-based PC
Processeur x86 Family 6 Model 15 Stepping 11 GenuineIntel ~2666 Mhz
Version du BIOS/Date Award Software International, Inc. F9, 18.08.2008
Version SMBIOS 2.4
Répertoire Windows C:\WINDOWS
Répertoire système C:\WINDOWS\system32
Périphérique de démarrage \Device\HarddiskVolume1
Option régionale Suisse
Couche d'abstraction matérielle Version = "5.1.2600.5512 (xpsp.080413-2111)"
Utilisateur THIERRY\Thierry Duruz
Fuseaux horaires Europe de l'Ouest (heure d'été)
Mémoire physique totale 4'096.00 Mo
Mémoire physique disponible 1.42 Go
Mémoire virtuelle totale 2.00 Go
Mémoire virtuelle disponible 1.95 Go
Espace pour le fichier d'échange 4.34 Go
Fichier d'échange C:\pagefile.sys

Sorry... it is in French !

Anyway, I would like to understand this :

Quote
Now you open a command prompt (click Windows Start button, enter "cmd" (without double quotes) and press Enter/Return).
At the command prompt enter the following commands, line by line, each line ends with pressing Enter/Return key (note that the path names are from the samples above, adjust them to your needs):

The first part is not very clear to me... if a French speaking person can translete in a comprehensive way it, would be nice ! because i prefer to do it this way than by installing a software...

The lines I would have to add are :

Code: [Select]
E:
cd \IL2
cd FB204
mklink /E Paintschemes "E:\jeux\Ubisoft\partage\Paintschemes"
cd ..
cd SAS Modact 3
mklink /E Paintschemes "E:\jeux\Ubisoft\partage\Paintschemes"
cd ..
cd 411MiniModAct
mklink /E Paintschemes "E:\jeux\Ubisoft\partage\Paintschemes"
cd ..
cd 1946Basic
mklink /E Paintschemes "E:\jeux\Ubisoft\partage\Paintschemes"
cd ..
cd HSFX
mklink /E Paintschemes "E:\jeux\Ubisoft\partage\Paintschemes"
cd ..
cd HSFX6Basic
mklink /E Paintschemes "E:\jeux\Ubisoft\partage\Paintschemes"
cd ..
cd IL-2 Sturmovik 1946
mklink /E Paintschemes "E:\jeux\Ubisoft\partage\Paintschemes"
cd ..
cd Mixed_Modact_UP3
mklink /E Paintschemes "E:\jeux\Ubisoft\partage\Paintschemes"
cd ..
cd SAS Modact 3
mklink /E Paintschemes "E:\jeux\Ubisoft\partage\Paintschemes"
cd ..
cd IL-2 Sturmovik 1946
mklink /E samples "E:\jeux\Ubisoft\partage\samples"
cd ..
cd Mixed_Modact_UP3
mklink /E samples "E:\jeux\Ubisoft\partage\samples"
cd ..
cd SAS Modact 3
mklink /E samples "E:\jeux\Ubisoft\partage\samples"
cd ..
cd IL-2 Sturmovik 1946
mklink /E samples "E:\jeux\Ubisoft\partage\samples"
cd ..
cd Mixed_Modact_UP3
mklink /E samples "E:\jeux\Ubisoft\partage\samples"
cd ..
cd SAS Modact 3
mklink /E samples "E:\jeux\Ubisoft\partage\samples"
cd ..
cd IL-2 Sturmovik 1946
mklink /E samples "E:\jeux\Ubisoft\partage\samples"
cd ..
cd Mixed_Modact_UP3
mklink /E samples "E:\jeux\Ubisoft\partage\samples"
cd ..
cd SAS Modact 3
mklink /E samples "E:\jeux\Ubisoft\partage\samples"

Is it correct to put 1 X cd \IL2, and then cd .. ?

Is it possible in 1 go ?
Logged

Yeager_1946

  • Modder
  • member
  • Offline Offline
  • Posts: 408
Re: Symbolic Links/Junctions/Hardlinks
« Reply #9 on: May 24, 2013, 11:14:58 AM »


Works like a charm!
Logged

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23878
  • Taking a timeout
    • STFU
Re: Symbolic Links/Junctions/Hardlinks
« Reply #10 on: May 24, 2013, 12:16:54 PM »

I run Win XP, but I do not know if it is XP 64 bit, or normal XP
Your PC runs XP "normal", no XP 64 Bit (the latter hasn't been seen in the wild in numbers anyway).
You will want to use this:
Quote
In case you're afraid to use the command prompt, you can use third party tools which are capable of creating NTFS symbolic links as well, e.g. Link Shell Extension.
Scroll down all the way and you will find the LSE for XP together with a driver with symbolic link support for XP at the very bottom of the page.

It's really worth the effort. I'm running a "common" IL-2 folder which is roughly 22 GB large, holding shared SFS files, screenshot and Paintscheme folders and all recorded tracks.
This shrinks each dedicated game installation to about 4 GB compared to 12-16 GB they used to be, and I'm even not yet sharing mods or more difficult stuff to share.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

Gaston

  • Modder
  • member
  • Offline Offline
  • Posts: 3252
Re: Symbolic Links/Junctions/Hardlinks
« Reply #11 on: May 24, 2013, 12:39:49 PM »

Let's try it... by the way... only the Paintschemes of my main install is... 135 Go (markings of IL-2 Mat Manager included) !

On my side, I just want to share simple things : paintschemes and samples.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.028 seconds with 26 queries.