Re: [Scilab-users] Get filename by script command

2024-01-22 Thread Jens Simon Strom

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/




___
users mailing list - [email protected]
Click here to unsubscribe: 

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 - [email protected]
Click here to unsubscribe: 

https://antiphishing.vadesecure.com/v4?f=dVpnOERZb0JKOFlaRnBNeQqfJFrOJ4Kc8dbn7tq5pEokAUCReNoz6rOuIg3xsXNZ&i=TG56OW16ck5wUlFINGEzQ79EVPKAJyWeDWfAUbTQrkI&k=1ZtS&r=enJEWGxReW5qbm5MS3pxTX0aub0KFoBVaTQE70WGQu3x45WWpYHk8jN23uw0gj-l&s=8a5edeb8333db7fe857ee3f371baa7dda20d6d5401ed0d5c4d516127e5059735&u=https%3A%2F%2Flis

Re: [Scilab-users] Get filename by script command

2024-01-22 Thread 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/




___
users mailing list - [email protected]
Click here to unsubscribe: 

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 - [email protected]
Click here to unsubscribe: 

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 perso

Re: [Scilab-users] Get filename by script command

2024-01-22 Thread Stefan Du Rietz

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/




___
users mailing list - [email protected]
Click here to unsubscribe: 

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 - [email protected]
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Get filename by script command

2024-01-22 Thread Hani Andreas Ibrahim




If I understood you correctly try:


get_absolute_file_path("test.sce");


Put it in the function or script, e.g.:


fn_script = fullfile(get_absolute_file_path("Myscript.sce") + "Myscript.sce")


Kind regard, Hani









Am 18.01.24 um 11:42 schrieb Jens Simon Strom:


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/





___
users mailing list - [email protected]
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


-- 
_
Hani Andreas Ibrahim
Bahnstr. 36b
40822 Mettmann, Deutschland

Tel.: +49-2104-3011727
Mob.: +49-175-2094559
E-Mail: [email protected]




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 - [email protected]
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Get filename by script command

2024-01-21 Thread Hani




If I understood you correctly try:


get_absolute_file_path("test.sce");


Put it in the function or script, e.g.:


fn_script = fullfile(get_absolute_file_path("Myscript.sce") + "Myscript.sce")


Kind regard, Hani









Am 18.01.24 um 11:42 schrieb Jens Simon Strom:


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/





___
users mailing list - [email protected]
Click here to unsubscribe: 
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 - [email protected]
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Get filename by script command

2024-01-18 Thread Stefan Du Rietz

Hi Jens, this line in your function or script gives the filename as you 
requested:

[filepath,filename]=get_absolute_file_path();

Regards
Stefan



On 18/01/2024 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/




___
users mailing list - [email protected]
Click here to unsubscribe: 

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 - [email protected]
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Get filename by script command

2024-01-18 Thread CRETE Denis
Classified as: {OPEN}

Hello ,
get_absolute_file_path("script.sce");
gives only the full path of the script under execution ...
HTH
Denis



{OPEN}
De : users  De la part de Jens Simon Strom
Envoyé : jeudi 18 janvier 2024 11:42
À : International users mailing list for Scilab. 
Objet : [Scilab-users] Get filename by script command

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/



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 - [email protected]
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users