how to read, write and create files on a hard drive 
Author Message
 how to read, write and create files on a hard drive

Hello,

  I was wondering if someone knows of any activeX controls that will allow
me to read, write and create files on a hard drive.  Also, to read, write
and create INI files on a hard drive.  Files such as docs.

Thanx



Fri, 27 Aug 2004 22:31:13 GMT  
 how to read, write and create files on a hard drive
Have you tried The following yet?

Dim sOutPutFile as string
sOutPutFile = "MyFirst.INI"

'-- Write to a file.
Open sOutPutFile for Output As #1
    Print #1, "Hello World"
    Print #1, "This is an INI File to be written to the hard drive"

    close #1

'--- Read from a file.
Dim sString as String
Dim sInputFile as string
Open sInputFile for Input As #1

    Do Until EOF(#1)

          Input #1, sString

    Loop
    Close #1

Good Luck.
JASZ.


Quote:
> Hello,

>   I was wondering if someone knows of any activeX controls that will allow
> me to read, write and create files on a hard drive.  Also, to read, write
> and create INI files on a hard drive.  Files such as docs.

> Thanx



Fri, 27 Aug 2004 22:38:10 GMT  
 how to read, write and create files on a hard drive
no, I am new to this

Quote:
> Have you tried The following yet?

> Dim sOutPutFile as string
> sOutPutFile = "MyFirst.INI"

> '-- Write to a file.
> Open sOutPutFile for Output As #1
>     Print #1, "Hello World"
>     Print #1, "This is an INI File to be written to the hard drive"

>     close #1

> '--- Read from a file.
> Dim sString as String
> Dim sInputFile as string
> Open sInputFile for Input As #1

>     Do Until EOF(#1)

>           Input #1, sString

>     Loop
>     Close #1

> Good Luck.
> JASZ.



> > Hello,

> >   I was wondering if someone knows of any activeX controls that will
allow
> > me to read, write and create files on a hard drive.  Also, to read,
write
> > and create INI files on a hard drive.  Files such as docs.

> > Thanx



Fri, 27 Aug 2004 22:47:38 GMT  
 how to read, write and create files on a hard drive
I like using the FileSystemObject.

First, include the Microsoft Scriptime Runtime
(scrrun.dll) in project references.

   Dim objFSO           As FileSystemObject
   Dim objTextStream    As TextStream

   Set objFSO = CreateObject("Scripting.FileSystemObject")

   Set objTextStream = objFSO.CreateTextFile
("d:\temp\testfile.txt", True)

   objTextStream.WriteLine ("Hello World.")
   objTextStream.Close

   Set objTextStream = Nothing
   Set objFSO = Nothing

There is more you can do with this such as reading, file
manipulation, checking, moving, deleting, and more.  Read
about it.

-The Cowboy-

Quote:
>-----Original Message-----
>Hello,

>  I was wondering if someone knows of any activeX

controls that will allow
Quote:
>me to read, write and create files on a hard drive.  

Also, to read, write
Quote:
>and create INI files on a hard drive.  Files such as docs.

>Thanx

>.



Sat, 28 Aug 2004 07:34:53 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Help needed reading database on CD and writing to database on hard drive

2. How to read the hard drives drive no.

3. Reading the Hard Drives Serial Number

4. Reading the hard drive's serial number

5. Reading the hard drive volume

6. Read Hard Drive Boot Record From VB

7. Read Hard Drive Boot Record From VB

8. Detect NEW file/files on the hard drive

9. Fisical Hard Disk read/write in VB

10. Fisical Hard Disk read/write in VB

11. Creating/Reading/Writing files and directories

12. Create, Read from and Write to INI file

 

 
Powered by phpBB® Forum Software