473,472 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

File System Object


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
Nov 17 '05 #1
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

Nov 17 '05 #2

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

Nov 17 '05 #3
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

Nov 17 '05 #4
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

Nov 17 '05 #5

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


Nov 17 '05 #6

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


Nov 17 '05 #7
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



Nov 17 '05 #8
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



Nov 17 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
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...
5
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? ...
0
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...
0
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...
5
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...
3
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...
1
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....
4
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....
3
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...
0
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...
0
marktang
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,...
0
Oralloy
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,...
0
tracyyun
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...
1
isladogs
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...
0
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...
0
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.