Hello,
I'm new to dot net and I can't seem to find the object name that is
equivalent to Scripting.FileSystemObject. Can anyone help?
Thanks,
V 8 7446
and also.. for the functions right(string, len_returned) and left(string,
len_returned)
"Vicky S" <ra********@comcast.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Hello, I'm new to dot net and I can't seem to find the object name that is equivalent to Scripting.FileSystemObject. Can anyone help?
Thanks, V
and also.. for the functions right(string, len_returned) and left(string,
len_returned)
"Vicky S" <ra********@comcast.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Hello, I'm new to dot net and I can't seem to find the object name that is equivalent to Scripting.FileSystemObject. Can anyone help?
Thanks, V
Take a look at System.IO
"Vicky S" <ra********@comcast.net> wrote in message
news:#3**************@TK2MSFTNGP10.phx.gbl... Hello, I'm new to dot net and I can't seem to find the object name that is equivalent to Scripting.FileSystemObject. Can anyone help?
Thanks, V
Take a look at System.IO
"Vicky S" <ra********@comcast.net> wrote in message
news:#3**************@TK2MSFTNGP10.phx.gbl... Hello, I'm new to dot net and I can't seem to find the object name that is equivalent to Scripting.FileSystemObject. Can anyone help?
Thanks, V
Thanks,
I can now generate a file.. but for some reason, it's not writing to it..
what am I doing wrong?
Dim oFile As System.IO.File, oStream As System.IO.StreamWriter
Dim filename As String
filename = Application.ExecutablePath & "\..\importlog.txt"
oStream = oFile.CreateText(filename)
oStream.WriteLine(Now() & " " & strMessage)
"Juliano Bortolozzi" <ju***************@hotmail.com> wrote in message
news:ux**************@TK2MSFTNGP10.phx.gbl... Take a look at System.IO
"Vicky S" <ra********@comcast.net> wrote in message news:#3**************@TK2MSFTNGP10.phx.gbl... Hello, I'm new to dot net and I can't seem to find the object name that is equivalent to Scripting.FileSystemObject. Can anyone help?
Thanks, V
Thanks,
I can now generate a file.. but for some reason, it's not writing to it..
what am I doing wrong?
Dim oFile As System.IO.File, oStream As System.IO.StreamWriter
Dim filename As String
filename = Application.ExecutablePath & "\..\importlog.txt"
oStream = oFile.CreateText(filename)
oStream.WriteLine(Now() & " " & strMessage)
"Juliano Bortolozzi" <ju***************@hotmail.com> wrote in message
news:ux**************@TK2MSFTNGP10.phx.gbl... Take a look at System.IO
"Vicky S" <ra********@comcast.net> wrote in message news:#3**************@TK2MSFTNGP10.phx.gbl... Hello, I'm new to dot net and I can't seem to find the object name that is equivalent to Scripting.FileSystemObject. Can anyone help?
Thanks, V
In your example you just have to call the Close method of the stream object.
But, to do what you want, I'd consider a different approach:
Dim stream As System.IO.StreamWriter
Try
stream = New System.IO.StreamWriter("c:\temp\test.txt", True)
stream.Write("test")
Finally
If Not stream Is Nothing Then
stream.Close()
End If
End Try
Note that you can't forget to close the stream, even if an exception has
occured.
"Vicky S" <ra********@comcast.net> wrote in message
news:#T**************@TK2MSFTNGP12.phx.gbl... Thanks, I can now generate a file.. but for some reason, it's not writing to it.. what am I doing wrong?
Dim oFile As System.IO.File, oStream As System.IO.StreamWriter
Dim filename As String
filename = Application.ExecutablePath & "\..\importlog.txt"
oStream = oFile.CreateText(filename)
oStream.WriteLine(Now() & " " & strMessage) "Juliano Bortolozzi" <ju***************@hotmail.com> wrote in message news:ux**************@TK2MSFTNGP10.phx.gbl... Take a look at System.IO
"Vicky S" <ra********@comcast.net> wrote in message news:#3**************@TK2MSFTNGP10.phx.gbl... Hello, I'm new to dot net and I can't seem to find the object name that is equivalent to Scripting.FileSystemObject. Can anyone help?
Thanks, V
In your example you just have to call the Close method of the stream object.
But, to do what you want, I'd consider a different approach:
Dim stream As System.IO.StreamWriter
Try
stream = New System.IO.StreamWriter("c:\temp\test.txt", True)
stream.Write("test")
Finally
If Not stream Is Nothing Then
stream.Close()
End If
End Try
Note that you can't forget to close the stream, even if an exception has
occured.
"Vicky S" <ra********@comcast.net> wrote in message
news:#T**************@TK2MSFTNGP12.phx.gbl... Thanks, I can now generate a file.. but for some reason, it's not writing to it.. what am I doing wrong?
Dim oFile As System.IO.File, oStream As System.IO.StreamWriter
Dim filename As String
filename = Application.ExecutablePath & "\..\importlog.txt"
oStream = oFile.CreateText(filename)
oStream.WriteLine(Now() & " " & strMessage) "Juliano Bortolozzi" <ju***************@hotmail.com> wrote in message news:ux**************@TK2MSFTNGP10.phx.gbl... Take a look at System.IO
"Vicky S" <ra********@comcast.net> wrote in message news:#3**************@TK2MSFTNGP10.phx.gbl... Hello, I'm new to dot net and I can't seem to find the object name that is equivalent to Scripting.FileSystemObject. Can anyone help?
Thanks, V
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Garet Cammer |
last post by:
Hi Everyone,
I am writing a program to perform backup operations using the VB scripting
File System Object to copy to removable media storage devices. The backup
operation works fine, but when we...
|
by: Ajay Garg |
last post by:
I wanted to loop through a directory and get the names of all the
files in the directory and put it in a table using the file system
object and VB scrip in a DTS package...
How can Ido this?
...
|
by: |
last post by:
Would I use the file system object to get the information Summary
information
for a file? When I right click a Word doc and go to Properties --> System
Tab,
there's information that I'd like to...
|
by: Stephen Costanzo |
last post by:
I am using the file system object to determine the available drive space
(and total drive space) of UNC path directories, however I am also trying to
strong name the DLL.
While I can create the...
|
by: mbosco51 |
last post by:
Hi. I have a virtual path setup in order to give my web server access
to a file on my app server. I am using the file system object to check
for the existance of the file and if it exists, it has...
| |
by: Lise |
last post by:
I am using the File System Object to create server side cookies and part of
the Function that I am writing deletes a file but I am getting a permissions
denied error on that line of code.
I am...
|
by: Chris |
last post by:
Is there any way of rollback any changes made by the file system object in
the event of an error. I delete a file and copy one somewhere and the copy
fails is there anyway to rollback the delete....
|
by: vdown |
last post by:
Im no ASP expert but have inherited a site that scans a load of folders for PDFs using the file system object.
All the PDFs are held in a time based heriarchical folder structure i.e....
|
by: vunet |
last post by:
The friendly URLs in ASP is the goal of my project. However, in ASP
there is no obvious page mapping as I researched compared to other
languages. What I mean is making www.site.com?page=Home being...
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |