473,508 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
+ 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 7447

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
2581
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
10422
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
1050
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
1172
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
6933
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
1378
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
1252
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
2904
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
2169
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
7115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7489
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...
0
5624
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5047
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
4705
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
3191
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
1547
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
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.