Sign in to follow this  
Followers 0
DeeRiee

How to remove this "\" ?

5 posts in this topic

Hello, i'm new here

I'm trying to remove this "\" from return of file select folder...

I'm try this

$folder=FileSelectFolder("Select","")
MsgBox(0,"Return",$folder)

If i select folder or subfolder

the return D:\My Folder\Sub Folder <--Nothing slash at the end >_<

If I select a Drive

the return being D:\ <--slash at the end :) How Can?

So, i need help how to remove that slash using StringSplit()

Because i'm newbie, i'm not understanding StringSplit() in help file...

Sorry 4 bad english, i'm indonesian :idiot:


Sorry 4 Bad English, I'm Indonesian...I'm really need 'Translator' for helping me posting in this forum (http://deeriee.wordpress.com)

Share this post


Link to post
Share on other sites



Hello, i'm new here

I'm trying to remove this "\" from return of file select folder...

I'm try this

$folder=FileSelectFolder("Select","")
MsgBox(0,"Return",$folder)

If i select folder or subfolder

the return D:\My Folder\Sub Folder <--Nothing slash at the end >_<

If I select a Drive

the return being D:\ <--slash at the end :) How Can?

So, i need help how to remove that slash using StringSplit()

Because i'm newbie, i'm not understanding StringSplit() in help file...

Sorry 4 bad english, i'm indonesian :idiot:

I don't think that is any problem if is D:\\

Anyway:

$FOLDER = FileSelectFolder("SELECT","")
If StringLen($FOLDER) = 3 Then 
    $FOLDER = StringLeft($FOLDER,2)
EndIf

When the words fail... music speaks

Share this post


Link to post
Share on other sites

I don't think that is any problem if is D:\\

Anyway:

$FOLDER = FileSelectFolder("SELECT","")
If StringLen($FOLDER) = 3 Then 
    $FOLDER = StringLeft($FOLDER,2)
EndIf
Thanks... :idiot:

But... i want to learn more about String Function, where i can learn more and easier, because i'm not understanding the help file example and explanation about String, it's so hard >_<

Where i can learn more? :)


Sorry 4 Bad English, I'm Indonesian...I'm really need 'Translator' for helping me posting in this forum (http://deeriee.wordpress.com)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Thanks... :P

But... i want to learn more about String Function, where i can learn more and easier, because i'm not understanding the help file example and explanation about String, it's so hard :idiot:

Where i can learn more? :)

I write for you an example with StringSplit():

$FOLDER = FileSelectFolder("SELECT","")
$SPLIT = StringSplit($FOLDER,"\")
If $SPLIT[2] = "" Then
    MsgBox(0,"","You select disk drive " & $SPLIT[1])
Else
    MsgBox(0,"","You select a folder from drive " & $SPLIT[1] & @CRLF & $FOLDER)
EndIf

More about String functions in help file. >_<

Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0