Thanks to Microsoft it will not read the Linux files but Linux will read the windows files:-) The simplest thing is to create a directory in windows for your data. You can then read it with either windows or linux hence only one copy. I believe this will solve your problem.
The libraries and sketches are stored in the sketchbook folder (libraries are installed under the libraries subfolder). You can set a custom sketchbook folder by doing this:
Select File > Preferences... from the Arduino IDE menus.
A "Preferences" dialog will open.
Click the Browse button to the right of the "Sketchbook location" field.
A "Select new sketchbook location" dialog will open.
Select the folder you want to use as your sketchbook.
Click the Choose button on the "Select new sketchbook location" dialog.
Click the OK button on the "Preferences" dialog.
If you make sure both IDE installations use the same sketchbook folder, you are set.
I guess this would not be suitable for my application as i would not be fixing a static folder location as the drive letter of portable drive would change.
You can try creating a symlink that points the portable/sketchbook subfolder of your portable IDE installation to the shared sketchbook location on the permanent drive.
Windows requires you to create symlinks as an administrator.
Ok i have done everything like installing and symlink as well and folder is shown in installation folder but the IDE closes down on its own without startup. And the first time it ran it did not use the portable folder at all.
When refernced in linux it needed to have it as portable i created it using symlink and everything worked fine. But still compiling for rp2040 works in windows but not linux i get a error missing file.
Great work on finding the cause of the problem! The Windows file system is case insensitive, so Portable and portable are equivalent. The Linux file system is case sensitive, so the correct case must always be used in paths.
I see this cause problems regularly in that library developers who use Windows never notice they have used incorrect filename case in their #include directives (e.g., #include <arduino.h>), but then the library doesn't work for Linux users.
Please provide the full and exact text of the error message and I'll take a look.