Hello,
I Write this code for get Stream from a file :
Dim _Stream As Stream = New FileStream("C:\Test.bin", FileMode.Open,
FileAccess.Read)
This code for Put Stream to File :
Dim i As Integer
Dim fs As FileStream = New FileStream("C:\app\test.bin",
FileMode.CreateNew,FileAccess.Write)
Dim str As StreamReader = New StreamReader(_Stream)
Dim stw As StreamWriter = New StreamWriter(fs, System.Text.Encoding.Unicode)
stw.BaseStream.Seek(0, SeekOrigin.End)
stw.Write(Str.ReadToEnd())
fs.Close()
Str.Close()
Not Works ....
Where i'm Wrong 3 12747
Giuseppe,
I tried your code, (with existing folders and file) and it did work fine for
me
Although file.copy(old,new) is in this case of course an easier command.
:-)
I hope this helps,
Cor
"Giuseppe" <pe***@msn.com> schreef in bericht
news:O5**************@TK2MSFTNGP15.phx.gbl... Hello,
I Write this code for get Stream from a file :
Dim _Stream As Stream = New FileStream("C:\Test.bin", FileMode.Open, FileAccess.Read)
This code for Put Stream to File :
Dim i As Integer Dim fs As FileStream = New FileStream("C:\app\test.bin", FileMode.CreateNew,FileAccess.Write) Dim str As StreamReader = New StreamReader(_Stream) Dim stw As StreamWriter = New StreamWriter(fs, System.Text.Encoding.Unicode) stw.BaseStream.Seek(0, SeekOrigin.End) stw.Write(Str.ReadToEnd()) fs.Close() Str.Close()
Not Works ....
Where i'm Wrong
I must send it to a remote server..
Giuseppe, I must send it to a remote server..
In your sample you are showing from C:\xxx to C:\xxx
Why are you showing that, just to have fun that we try to help you?
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Siddharth Taneja |
last post by:
Hi,
I have a very simple prg over here, trying to read the lines of a file
#include <iostream>
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
|
by: gnv |
last post by:
Hi all,
I am writing a cross-browser(i.e. 6 and netscape 7.1) javascript
program to save an XML file to local file system.
I have an xml string like below:
var xmlStr = "<?xml version="1.0"...
|
by: Johnny Google |
last post by:
Here is an example of the type of data from a file I will have:
Apple,4322,3435,4653,6543,4652
Banana,6934,5423,6753,6531
Carrot,3454,4534,3434,1111,9120,5453
Cheese,4411,5522,6622,6641
The...
|
by: Sky Sigal |
last post by:
I have created an IHttpHandler that waits for uploads as attachments for a
webmail interface, and saves it to a directory that is defined in
config.xml.
My question is the following:
assuming...
|
by: Daniel Corbett |
last post by:
I am trying to save a file dynamically created in a webpage. I get the
following headers, but cannot figure out how to save the attachment. I am
basically trying to replicate what internet...
|
by: IcingDeath via DotNetMonster.com |
last post by:
I am building this SQL Server database app in which i can store files. In
order to display files I want to have the app show the associated icon for
the extension of the file that is in the...
|
by: rony_16 |
last post by:
Hi,
I have a program that connects to a site With WebRequest and
WebResponse .
The response of this site is a file (csv file).
The problem is that the file do not comes as a stream , hi is a part...
|
by: AdrianH |
last post by:
Assumptions
I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C++ programming.
FYI
Although I have called...
|
by: J055 |
last post by:
Hi
I have the following code. I upload an XML file using the FileUpload object,
store the stream in a session so the user gets the chance to confirm some
options then pass the stream from the...
|
by: Dennis |
last post by:
Hi, I have a text file that contents a list of email addresses like
this:
"foo@yahoo.com"
"tom@hotmail.com"
"jerry@gmail.com"
"tommy@apple.com"
I like to
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |