Computing.Net > Forums > Programming > VB9 filestream

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VB9 filestream

Reply to Message Icon

Name: wille
Date: August 2, 2008 at 17:56:06 Pacific
OS: WINDOWS XP Home Edition S
CPU/Ram: 3.2GHz
Comment:

Hello I need a way to write to files NOT using a filestream. Is there such a way in VB9? And when I'm at it, how do I (in vb9) execute a commandline program with syntaxes of my choice(maybe input from textboxes) without writing a batch file and executing it?

Live the life as you know it
/ Wille



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: August 3, 2008 at 16:39:28 Pacific
Reply:

Is there such a way in VB9?
Not that I know of. I suppose you could use ActiveX's Scripting.FileSystemObject. Any reason FileStream is insufficient?

how do I (in vb9) execute a commandline program with syntaxes of my choice without writing a batch file and executing it?
I'm not sure what you mean; if you can run a Command Script from your program, what's keeping you from running a program?


0

Response Number 2
Name: wille
Date: August 3, 2008 at 16:55:08 Pacific
Reply:

Well I've been using VB9 to make a nice interface and stuff but then a commandline program to compress files. This program then (in the VB part) takes information from the user and then via a filestream writes batchfiles and executes them. These batchfiles contain the information from the user in syntaxes for the commandline program.
This however, I've noticed, is very unstable. The filestream doesn't write the files correctly. The files will be readable in notepad or any other similar program ofc, but the commandprompt detects like hidden characters or something. I don't know if it's the filestream but I think that's the best place to start. But if there's a way to execute this commandline program with the certain syntaxes without having to use a filestream and batchfiles, it would make it so much easier.
What I meen with "execute this commandline program with the certain syntaxes" is that I can use the shell command like this:
Shell("compress.exe")
That would only execute the compress.exe which would probably close since it don't know which files to compress. If I could call compress.exe like this:
shell("compress -b "archivename" "file1" "file2")
then it would be much easier.
Hope this clearyfies everything.

Live the life as you know it
/ Wille


0

Response Number 3
Name: Razor2.3
Date: August 4, 2008 at 17:16:59 Pacific
Reply:

the commandprompt detects like hidden characters or something
You're opening the file as UTF; you need to be using ASCII.

If I could call compress.exe like this:
shell("compress -b "archivename" "file1" "file2")
then it would be much easier.

There shouldn't be any reason you can't.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VB9 filestream

filestream question www.computing.net/answers/programming/filestream-question/8350.html

Vb9 tcp www.computing.net/answers/programming/vb9-tcp/16999.html

Extracting a PDF from a GIF image www.computing.net/answers/programming/extracting-a-pdf-from-a-gif-image/12651.html