04 November 2021, 12:54 | #1 |
Registered User
Join Date: Apr 2019
Location: Heerlen / The Netherlands
Posts: 52
|
set script path as relative path
Hi there,
I have a simple question. How can I have a script refer to files using a relative path. ie scipt : run <script'scurrentlocation>/filesfolder/file The idea is that the folder with the script inside and some folder, with files in it that are invoked by the script, can be moved anywhere and the script will still function because it is referring to the other files' location in a manner relative to the script's own current location. What would be the easiest way to do this ? Last edited by Tolgod; 04 November 2021 at 13:29. |
04 November 2021, 14:01 | #2 |
Registered User
Join Date: Oct 2021
Location: England
Posts: 1,312
|
just use
Run /filesfolder/file dont mention any device/volume/etc, not sure about scripts, but launched programs can also refer to PROGDIR: which is the folder they were launched in. |
04 November 2021, 19:44 | #3 |
Registered User
Join Date: Apr 2019
Location: Heerlen / The Netherlands
Posts: 52
|
Hi there and tnx for helping out.
Wow....completely overlooked the simple fact here that the script will open it's own cli at current root. So simple and logic, I feel silly Happy you put me on the right path again (pun intended :$ :'D ) |
05 November 2021, 13:08 | #4 |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 5,130
|
Just in case you don't know : in the S: folder is a script called PCD. It can be handy in some situations when moving from one folder to another and back is needed
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Non-relative rom-path bug. | hceline | support.WinUAE | 3 | 21 January 2019 19:45 |
Possible to set root path for floppies in config? | Foebane | support.WinUAE | 3 | 03 July 2018 00:11 |
Relative path in portable mode: | bladecgn | request.UAE Wishlist | 2 | 01 October 2017 18:54 |
Install path | ras2a | support.FS-UAE | 7 | 14 June 2015 17:42 |
How to set a subfolder as standard path for games ??? o.O | TheChris80 | support.WinUAE | 9 | 22 November 2009 19:20 |
|
|