Advertisement

File Extensions

Started by April 14, 2001 06:56 PM
1 comment, last by CGMon 23 years, 10 months ago
Hey guyz Could someone help me? I am trying to find out how to remove file extensions from filenames using Visual Basic Thanks in advance
C G M O N
Const FileName as string = "TestFile.this"
public function RemoveExt(FileName as string) as string
''In the file name there can not be a "." in it other then the
''one befor the Ext
RemoveExt = left$(FileName,instr$(filename,"."))
end Function

i did that off the top of my head so if its rong sorry
umm it should give you a idea of how to do it



-VBLimits
Sorry about the Spelling..
-VBLimitsSorry about the Spelling..
Advertisement
Why is this in the Nehe forums? Here it is in C for no reason what-so-ever:
  void RemovePastPeriod(char *str) {  while(*str) {    if(*str==''.''} {      *str = NULL;      break;    }    str++;  }}  


"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://druidgames.cjb.net/

This topic is closed to new replies.

Advertisement