It is currently Mon Jul 01, 2024 10:27 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: filename help[Solved]
PostPosted: Thu Oct 15, 2020 1:25 am  (#1) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
GIMP Version: 2.10.22
Operating System: Windows
GIMP Experience: Experienced User



of this file name 'C:\Users\Graechan\Documents\customfont\1Sans.xcf' all I want to use as a name is '1Sans.xcf'

I've tried using strbreakup and string-append but I am having difficulty getting things right hoping someone can assist as I'm having a brain fade

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Last edited by Graechan on Thu Oct 15, 2020 9:54 pm, edited 1 time in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: filename help
PostPosted: Thu Oct 15, 2020 2:29 am  (#2) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7744
Location: On the other side of this screen
Graechan wrote:
GIMP Version: 2.10.22
Operating System: Windows
GIMP Experience: Experienced User



of this file name 'C:\Users\Graechan\Documents\customfont\1Sans.xcf' all I want to use as a name is '1Sans.xcf'

I've tried using strbreakup and string-append but I am having difficulty getting things right hoping someone can assist as I'm having a brain fade


Ok I could be completely wrong (not understanding your dilemma) but isn't
'C:\Users\Graechan\Documents\customfont\1Sans.xcf' the path to the file? and '1Sans.xcf' the file name?

_________________


Top
 Post subject: Re: filename help
PostPosted: Thu Oct 15, 2020 3:15 am  (#3) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
This is how I loaded a file from a directory but when I wanted to name the file with filename it included the path

(set! file-list (cadr (file-glob (string-append inDir "\\*.xcf") 1)))
(set! filename (car file-list))
(set! img (car (gimp-file-load 1 filename filename)))

And I ended up with a layer name of 'C:\Users\Graechan\Documents\customfont\1Sans.xcf'

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: filename help
PostPosted: Thu Oct 15, 2020 3:40 am  (#4) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
(car (last (strbreakup filepath DIR-SEPARATOR)))


Where the filepath is "C:\\Users\\Graechan\\Documents\\customfont\\1Sans.xcf" if written explicitly

Kevin


Top
 Post subject: Re: filename help
PostPosted: Thu Oct 15, 2020 9:53 pm  (#5) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Thank you Paynekj as it turned out I was not even close, I lost my cheat sheet on strings and memory at my age is fickle to say the least

Image

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Permission Denied Error on Export to same filename

4

No new posts Attachment(s) Unknown command or filename error - Used to work fine until now...

5



* Login  



Powered by phpBB3 © phpBB Group