Hello,
Thanks IgnorantGuru for SpaceFM(GTK2)
I really like it.
With a file name like NAME.EXT
How can I have some variables for only :
- The File Name Without Extension : NAME
- The Extension without File name : EXT
Thanks for your help
jpalsu
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
SpaceFM doesn't provide these, it's up to you to use bash functions to get them. Maybe there are some functions available for this, or you can see the string operations.
Roughly you can do
filename="name.tar.gz"
ext="${filename#*.}"
name="${filename%.$ext}"
echo $name$ext
: name tar.gz
But this can be a tricky area because some filenames contain periods, etc. Or maybe there's a system level way to do it eg with the 'file' program, not sure.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
Hello,
Thanks IgnorantGuru for SpaceFM(GTK2)
I really like it.
With a file name like NAME.EXT
How can I have some variables for only :
- The File Name Without Extension : NAME
- The Extension without File name : EXT
Thanks for your help
jpalsu
SpaceFM doesn't provide these, it's up to you to use bash functions to get them. Maybe there are some functions available for this, or you can see the string operations.
Roughly you can do
But this can be a tricky area because some filenames contain periods, etc. Or maybe there's a system level way to do it eg with the 'file' program, not sure.