H
Hans
Continuation of Create a Copy of Files thread:
http://groups.google.com/group/comp.lang.c/browse_frm/thread/44b471e6733a407a
This is the sscanf() line I use to extract the file extension/type.
(Please ignore the values I used. I copied them from somebody's post,
but do suggest proper values if it's critical.)
char Title[512];
char FileType[16];
Matched = sscanf( thisFile->d_name , "%511[^.].%15s" , Title ,
FileType );
What I want is to get the file extension so I can skip files with
wrong extensions. If I have the following files in the target folder,
what sscanf() parameters do I need to get the following values for
FileType?
ebook1.pdf - FileType = "pdf"
ebook1.pdf.txt - FileType = "txt"
ebook2.djvu - FileType = "djvu"
ebook2.djvu.txt - FileType = "txt"
ebook3.html.pdf - FileType = "pdf"
http://groups.google.com/group/comp.lang.c/browse_frm/thread/44b471e6733a407a
This is the sscanf() line I use to extract the file extension/type.
(Please ignore the values I used. I copied them from somebody's post,
but do suggest proper values if it's critical.)
char Title[512];
char FileType[16];
Matched = sscanf( thisFile->d_name , "%511[^.].%15s" , Title ,
FileType );
What I want is to get the file extension so I can skip files with
wrong extensions. If I have the following files in the target folder,
what sscanf() parameters do I need to get the following values for
FileType?
ebook1.pdf - FileType = "pdf"
ebook1.pdf.txt - FileType = "txt"
ebook2.djvu - FileType = "djvu"
ebook2.djvu.txt - FileType = "txt"
ebook3.html.pdf - FileType = "pdf"