Hello, Good solution! I did not realize it because I still use Vers 6.1.0.
My work around is the following function as inspired by Samuel Gougeon (see url): function [fullPath, path, name, ext, nameplusext]=pathexplode() //https://users.scilab.narkive.com/aTRQOAMW/scilab-equivalent-of-mfilename // function returns details of the calling script's path // input arguments: none // Output example // fullPath: "C:\Users\Ada\Documents\myscript.sce" // path: "C:\Users\Ada\Documents\" // name: "myscript" // ext: ".sce" // nameplusext: "myscript.sce" [u,t,n]=file(); i = grep(n',"/(?:.*\.sci|.*\.sce)$/","r") fullPath = n(i(1)) [path, name, ext] = fileparts(fullPath) nameplusext=name+ext endfunction Thanks a lot for your responses! Regards Jens ----------------------------------------------------------------- Am 22.01.2024 um 09:59 schrieb Stéphane Mottelet: Hello, Yes this call form (available since Scilab 6.1.1) is the most portable as it does not need to specify a script filename. S. On 22/01/2024 09:42, Stefan Du Rietz wrote: Hello Jens, this line in your function or script returns its file name as you requested: [filepath,filename]=get_absolute_file_path(); Best regards Stefan On 2024-01-18 11:42, Jens Simon Strom wrote: Hi, I look for a command which -- as part of a script -- returns a string containing the file name or full path name of the current script. uigetfile() seemed to be close but does something else. Regards Jens This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Dassault Systèmes does not accept or assume any liability or responsibility for any use of or reliance on this email. Please be informed that your personal data are processed according to our data privacy policy as described on our website. Should you have any questions related to personal data protection, please contact 3DS Data Protection Officer https://www.3ds.com/privacy-policy/contact/<https://antiphishing.vadesecure.com/v4?f=dVpnOERZb0JKOFlaRnBNeQqfJFrOJ4Kc8dbn7tq5pEokAUCReNoz6rOuIg3xsXNZ&i=TG56OW16ck5wUlFINGEzQ79EVPKAJyWeDWfAUbTQrkI&k=1ZtS&r=enJEWGxReW5qbm5MS3pxTX0aub0KFoBVaTQE70WGQu3x45WWpYHk8jN23uw0gj-l&s=a9b075455d739309b51b0437661488b8969297ff91987092dbcf4ff08c373f78&u=https%3A%2F%2Fwww.3ds.com%2Fprivacy-policy%2Fcontact%2F> _______________________________________________ users mailing list - users@lists.scilab.org<mailto:users@lists.scilab.org> Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org><mailto:users-unsubscr...@lists.scilab.org> https://lists.scilab.org/mailman/listinfo/users<https://antiphishing.vadesecure.com/v4?f=dVpnOERZb0JKOFlaRnBNeQqfJFrOJ4Kc8dbn7tq5pEokAUCReNoz6rOuIg3xsXNZ&i=TG56OW16ck5wUlFINGEzQ79EVPKAJyWeDWfAUbTQrkI&k=1ZtS&r=enJEWGxReW5qbm5MS3pxTX0aub0KFoBVaTQE70WGQu3x45WWpYHk8jN23uw0gj-l&s=8a5edeb8333db7fe857ee3f371baa7dda20d6d5401ed0d5c4d516127e5059735&u=https%3A%2F%2Flists.scilab.org%2Fmailman%2Flistinfo%2Fusers> This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Dassault Systèmes does not accept or assume any liability or responsibility for any use of or reliance on this email. Please be informed that your personal data are processed according to our data privacy policy as described on our website. Should you have any questions related to personal data protection, please contact 3DS Data Protection Officer https://www.3ds.com/privacy-policy/contact/<https://antiphishing.vadesecure.com/v4?f=dVpnOERZb0JKOFlaRnBNeQqfJFrOJ4Kc8dbn7tq5pEokAUCReNoz6rOuIg3xsXNZ&i=TG56OW16ck5wUlFINGEzQ79EVPKAJyWeDWfAUbTQrkI&k=1ZtS&r=enJEWGxReW5qbm5MS3pxTX0aub0KFoBVaTQE70WGQu3x45WWpYHk8jN23uw0gj-l&s=a9b075455d739309b51b0437661488b8969297ff91987092dbcf4ff08c373f78&u=https%3A%2F%2Fwww.3ds.com%2Fprivacy-policy%2Fcontact%2F> _______________________________________________ users mailing list - users@lists.scilab.org<mailto:users@lists.scilab.org> Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org><mailto:users-unsubscr...@lists.scilab.org> https://antiphishing.vadesecure.com/v4?f=dVpnOERZb0JKOFlaRnBNeQqfJFrOJ4Kc8dbn7tq5pEokAUCReNoz6rOuIg3xsXNZ&i=TG56OW16ck5wUlFINGEzQ79EVPKAJyWeDWfAUbTQrkI&k=1ZtS&r=enJEWGxReW5qbm5MS3pxTX0aub0KFoBVaTQE70WGQu3x45WWpYHk8jN23uw0gj-l&s=8a5edeb8333db7fe857ee3f371baa7dda20d6d5401ed0d5c4d516127e5059735&u=https%3A%2F%2Flists.scilab.org%2Fmailman%2Flistinfo%2Fusers -- Stéphane Mottelet Ingénieur de recherche EA 4297 Transformations Intégrées de la Matière Renouvelable Département Génie des Procédés Industriels Sorbonne Universités - Université de Technologie de Compiègne CS 60319, 60203 Compiègne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Dassault Systèmes does not accept or assume any liability or responsibility for any use of or reliance on this email. Please be informed that your personal data are processed according to our data privacy policy as described on our website. Should you have any questions related to personal data protection, please contact 3DS Data Protection Officer https://www.3ds.com/privacy-policy/contact/ _______________________________________________ users mailing list - users@lists.scilab.org<mailto:users@lists.scilab.org> Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org><mailto:users-unsubscr...@lists.scilab.org> https://lists.scilab.org/mailman/listinfo/users This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Dassault Systèmes does not accept or assume any liability or responsibility for any use of or reliance on this email. Please be informed that your personal data are processed according to our data privacy policy as described on our website. Should you have any questions related to personal data protection, please contact 3DS Data Protection Officer https://www.3ds.com/privacy-policy/contact/
_______________________________________________ users mailing list - users@lists.scilab.org Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org> https://lists.scilab.org/mailman/listinfo/users