get_filename(3alleg4) Allegro manual get_filename(3alleg4)NAME
get_filename - Returns a pointer to the filename portion of a path. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
char *get_filename(const char *path);
DESCRIPTION
Finds out the filename portion of a completely specified file path. Both `' and `/' are recognized as directory separators under DOS and
Windows. However, only `/' is recognized as directory separator under other platforms. Example:
get_executable_name(name, sizeof(name));
allegro_message("Running `%s'
", get_filename(name));
Note that Allegro won't perform any IO operations during the verification. This means that if you have `/a/path/like/this/', which doesn't
have a filename, the function will return a pointer to the trailing null character. However, if you have `/a/path/like/this', Allegro will
return a pointer to `this', even if it is a valid directory.
RETURN VALUE
Returns a pointer to the portion of `path' where the filename starts, or the beginning of `path' if no valid filename is found (eg. you are
processing a path with backslashes under Unix).
SEE ALSO get_extension(3alleg4), put_backslash(3alleg4), replace_filename(3alleg4), exmidi(3alleg4)Allegro version 4.4.2 get_filename(3alleg4)
Check Out this Related Man Page
get_filename(3alleg4) Allegro manual get_filename(3alleg4)NAME
get_filename - Returns a pointer to the filename portion of a path. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
char *get_filename(const char *path);
DESCRIPTION
Finds out the filename portion of a completely specified file path. Both `' and `/' are recognized as directory separators under DOS and
Windows. However, only `/' is recognized as directory separator under other platforms. Example:
get_executable_name(name, sizeof(name));
allegro_message("Running `%s'
", get_filename(name));
Note that Allegro won't perform any IO operations during the verification. This means that if you have `/a/path/like/this/', which doesn't
have a filename, the function will return a pointer to the trailing null character. However, if you have `/a/path/like/this', Allegro will
return a pointer to `this', even if it is a valid directory.
RETURN VALUE
Returns a pointer to the portion of `path' where the filename starts, or the beginning of `path' if no valid filename is found (eg. you are
processing a path with backslashes under Unix).
SEE ALSO get_extension(3alleg4), put_backslash(3alleg4), replace_filename(3alleg4), exmidi(3alleg4)Allegro version 4.4.2 get_filename(3alleg4)
hi,
I have a script which accept filename and process them, however, one of the file needs 'special' handling so I need to identify it, say the filename contains the word "STOCK" (i.e. NEWYORKSTOCKLIST20060627.txt), I want to check if the filename contains the word "STOCK", how can I do that?... (1 Reply)
Hi friends,Can iuse Bash commands in my C programs,like that
if((cd /root/Desktop/) == true)
do somethig.
I have to control a variable called path,i want to know,this path is in Unix Directories or not,Is there anybody help me?,
Thank you..
***email address removed... (3 Replies)
working with the Win32API
I am trying to implement a function in my program that will take the full
filename and path of a shortcut (.lnk) file and returns an std::string that is
the path+filename+arguments of the program to run, and also a STARTUPINFO
structure that can be passed to... (1 Reply)
In a foreach loop I end up with $file containing the filename INCLUDING the whole path. I want this reduced to just the filename, but I can't seem to remember how I did it some years back. I am sure I can do it with "sed", but I am pretty sure I have seen a simpler command.
Anyone?
borgeh (3 Replies)
Hi
Can we get the full path of the filename from file descriptor.
pread64(405, "0602\0\0\0960EB9DC BC7F9".., 16384, 0x0000000583AE4000) = 16384
How do i get the filename with full path of the file with fd=405
regards (2 Replies)
Hi
I would like to extract the first portion of filename from a list of files.
The filename pattern is of the form 123456789_TEXT_TEXT_TEXT_.csv. I want to extract just the numerical portion of this filename from the list of files and then output this into another text file.
K (6 Replies)
Well since Windows always laments over some of my files having a too long "path+filename" and it gets in the way of copying complete directory structures I would love to have a DOS Script that helps me with finding those.
I already tried DCSoft Long Filename Finder but that is neither DOS based... (3 Replies)
Hi all! i have a question how do you sort the filename of a path directory according to alphabetic order.
Example: sort according to highlighted text. There maybe space for filename
Path=/home/pikamon/Desktop/ABC;
Path=/home/pikamon/Desktop/ABD;
Path=/home/pikamon/Desktop/Riduan la;... (5 Replies)
Dear Experts,
I have some directory structure something like follows. I would like to cut portion of it. Would you please help me? I have to run this on several sql's. The directory path is dynamic. I have cut what comes after first "sql" string.
Input:... (3 Replies)
I need to manipulate one Database file on Solaris 11 in which contains more than 5000 lines of data file path like this:
'/data1/oradata/DBNAME/system01.dbf',
'/data7/oradata/DBNAME/undotbs1_01.dbf',
'/data1/oradata/DBNAME/sysaux01.dbf',
'/data28/oradata/DBNAME/userdata01.dbf',
... (6 Replies)