|
-
Aug 22nd, 2000, 08:02 PM
#1
Thread Starter
Junior Member
Here's a simple question! My application uses the Command statement. It returns a filename like "C:\Windows\file.txt". I just want C:\Windows\file.txt without the expressions. I don't get it... I knew how to do this a week ago... maybe time for some sleep? Thanks.
-
Aug 22nd, 2000, 08:11 PM
#2
Addicted Member
what do you mean by without the expressions? do you mean without the quotes.
because i use apps that use Command and the strings never have the quotes embedded in them...
-
Aug 22nd, 2000, 08:13 PM
#3
Code:
Dim FF As Integer
Dim FName As String
If Command$ <> "" Then
FName = Replace(Command$, Chr$(34), " ")
FName = Trim$(FName)
FF = FreeFile
Open FName For Input As FF
txtText = Input(LOF(FF), FF)
Close FF
End If
-
Aug 22nd, 2000, 08:40 PM
#4
Thread Starter
Junior Member
Thank you! That did the trick.
P.S. - There's a service pack 4
-
Aug 22nd, 2000, 10:06 PM
#5
I know there is a SP4, but I have a 56k modem, and am just going to wait till VB7 comes out .
-
Aug 23rd, 2000, 01:57 AM
#6
Fanatic Member
Won't that add a space to the front and end of the string?
Just being pedantic , funkyd77, you get the quotes when you drop a file (icon) on your app rather than pass it parameters, probably other situations too (extentions maybe, I forget).
Not much of use in SP4, if I knew what I know now I wouldn't have bothered with the 50meg download.
bugs fixed a plenty apparently but I haven't noticed anything
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
-
Aug 23rd, 2000, 01:58 AM
#7
Fanatic Member
oh,
on second read I spotted the TRIM statement :-)
why not just use "" instead of " " ????
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|