yucatan Posted February 7, 2009 Share Posted February 7, 2009 fileopendialog returns this C:\Documents and Settings\yucatan\Bureaublad\Geplakte_Gegevens_bc18.jpg when i select a file i get that ofcourse.. the peoblem is i wanne get the only the file name so Geplakte_Gegevens_bc18.jpg is there i way i can filter this? i was thinking on something like strintsplit \ or StringInStr bot both are not fully save somebody any advise? Link to comment Share on other sites More sharing options...
Authenticity Posted February 7, 2009 Share Posted February 7, 2009 $Arr = StringSplit($File, '\') $FileName = $Arr[$Arr[0]-1] Link to comment Share on other sites More sharing options...
sandin Posted February 7, 2009 Share Posted February 7, 2009 $hFile = FileOpenDialog("Select file", "", "All files (*.*)", 3) if @error then MsgBox(0, "", "Cancel pressed") Exit EndIf $split = StringSplit($hFile, "\") $display = $split[$split[0]] MsgBox(0, "", $display) Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
yucatan Posted February 7, 2009 Author Share Posted February 7, 2009 $hFile = FileOpenDialog("Select file", "", "All files (*.*)", 3) if @error then MsgBox(0, "", "Cancel pressed") Exit EndIf $split = StringSplit($hFile, "\") $display = $split[$split[0]] MsgBox(0, "", $display)thx alot sandin good work thx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now