Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7750123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:12:37+00:00 2026-06-01T11:12:37+00:00

I am trying to get the name of a file when I select it

  • 0

I am trying to get the name of a file when I select it using a file chooser.

I managed to do

    gchar *name = gtk_file_chooser_get_filename(open_dialog);   

but that will return /home/user/Desktop/test.file and not test.file which I want to.

Is there any method to get the name of the file and not the uri of it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:12:38+00:00Added an answer on June 1, 2026 at 11:12 am

    How do you open the file if you have no the whole “URI” (path) to it?? If you want only test.file you can extract it from the whole path. There’s the POSIX function basename and glib has a function too: g_path_get_basename.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get my name and trip input fields to line, but they're
I am trying to get the process name in android by using the method
I am trying to get names from a .txt file. I am using file('filename.txt')
I'm trying to get the full path of a directory using Tkinter, but only
I'm trying to get data from CSV file , by using fill() method i
I am trying to get the number of children that a node has but
Im trying to get the name of a user by looking in up with
I had been trying to get the tag name and its value in java
I'm trying to get the instance name of my class. The way I do
I'm very new to c++ and boost. I'm trying to get the host name

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.