Re: Format floppy thru VB
From: Fosco (fake_at_fake.invalid)
Date: 03/04/04
- Next message: Jim Carlock: "Re: What's up with KP's vb ?"
- Previous message: Rick Rothstein: "Re: Data Statements."
- In reply to: Sunil Gosavi: "Re: Format floppy thru VB"
- Next in thread: Fosco: "Re: Format floppy thru VB"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 04 Mar 2004 06:16:00 GMT
"Sunil Gosavi"
> Thanks, but this method shows the dialog box, i need
> to do it without user interventions.
Private Sub Form_Load()
Dim cmd As String
Const STAY = " /K "
Const NOSTAY = " /C "
cmd = "format.com /q /autotest A:"
Shell Environ("COMSPEC") & NOSTAY & cmd, vbHide
Unload Me
End Sub
> What i need actually is...
> I need to read and write a txt file in floppy
'*.vbs (FileSystemObject)
Const ForReading = 1, ForWriting = 2, ForAppending = 8
sLogFile = "A:\Test.log"
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oLogFile = oFSO.OpenTextFile(sLogFile, 2, True, 0)
oLogFile.WriteLine "AAAAAA"
oLogFile.WriteLine "BBBBBB"
Set oLogFile = oFSO.OpenTextFile(sLogFile, 1, True, 0)
sAll = oLogFile.ReadAll
Msgbox sAll
-- Fosco
- Next message: Jim Carlock: "Re: What's up with KP's vb ?"
- Previous message: Rick Rothstein: "Re: Data Statements."
- In reply to: Sunil Gosavi: "Re: Format floppy thru VB"
- Next in thread: Fosco: "Re: Format floppy thru VB"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|