'''Open the file you want to change asume'c:\Data.dat'
'''BEFORE RUNNING SAVE A COPY OF YOUR DATA FILE IN A SAFE SPOT - JUST INCASE
Open "c:\data.dat" FOR INPUT AS #1
OPEN "C:\TEMP.DAT" FOR OUTPUT AS #2
while not eof(1)
Line Input #1, d$
d$ = ucase(d$)
''' Move Ucase data to Temp.dat
print #2, d$
wend
close #1
close #2
Do you mean that you wish to change the contents of the file to contain only uppercase? If so, my (very high level) suggestion is:
First, rename the original file Rename <origName> to <backupName>
Open the text file: Open <backupName>For Input As #1
Read the contents into a string variable <string> = Input$(LOF(1), #1)
Upshift the variable <string> = ucase(<string>)
Close the backup file Close #1
create a new file with original name Open <origName> For Output As #1
write the variable to the new file Print #1, <string>
close the new file Close #1
optionally delete the old file Kill <backupName>
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.