I looked for "sysFileFind" in the MSDN Library Visual Studio 6.0, and I also looked for it at http://msdn.microsoft.com/ and couldn't find it in either place.
Does anyone have any idea why this isn't working?
If Dir("C:\Custlink") <> "" Then
Kill ("C:\Custlink\*.*")
If Dir("C:\Custlink\Batch") <> "" Then
Kill ("C:\Custlink\Batch\*.*")
RmDir ("C:\Custlink\Batch")...
This is all getting a bit frustrating. I'm new at this, I'm not even a programer, but I'm doing some projects for the company. Now because of the error checking for the customer ID, I do have to check to see if "SET %DRV=" + Left(drvSoftware.Drive, 1) has been added to the file...
Maybe I should have worded it differently. How do I get the program to loop back to the begining until something is entered in txtCustomer.Text field? I only want the error to pop up if there is nothing in that field. If nothing is there, loop back until something is there, else go on with...
How would I loop this until it was done?
Dim ChkID As String
ChkID = txtCustomer.Text
If ChkID = "" Then
Message = "Please fill in the Customer ID Number"
MsgBox Message, vbOKOnly + vbInformation, "ERROR"
End If
Say I had a return of C:\shop\data\mdb from a dirlistbox. Would there be a way to make the drive letter and the returned directories into variables
so..
C = W, shop = x, data = y, mdb = z and then write that to a file and say...
W:
CD X
CD Y
CD Z
I'm quite new at all of this. Thank you to...
Hmmm... I think I should have asked it a little diffently. That is more than I need by far I think. As I rewrote what I did, I no longer had to look if something was already there, just append. What I need to do is just insert a string of txt into file on a certain line.... say like this...
How would I add txt to a certin line in a txt or bat file? Say I wanted to add it to line 4...
Dim lngI As Long
Dim Autobat As Long
Dim strFile As String
Autobat = FreeFile
Open "C:\Autoexec.bat" For Input As #Autobat
strFile = Input(LOF(Autobat), #Autobat)...
What I'm trying to do is look for a string in a file. If it's not there, add it. It it is there, replace it with a new one. I seem to be doing something wrong....
Dim Autobat As Long
Dim aryByt() As Byte
Dim strFile As String
Autobat = FreeFile
Open...
I have a similer question, but a little different. I've been looking through page after page of already answered questions looking for an answer, but could find none.
How would I replace a line of text in a txt file? If I can't just replace a line, is there a way to just take a line of text...
Thank You all for your help on that, I got that figured out, but now I have another matter that has come into view. This is what I have for writing the batch file...
Dim Sdrvbat As String
Sdrvbat = FreeFile
Open "C:\Sdrv.bat" For Output As #Sdrvbat
Print #Sdrvbat, "SET...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.