troubleshooting Question

Not exactly what was asked for...

Avatar of zotdog69
zotdog69Flag for United States of America asked on
12 Comments1 Solution355 ViewsLast Modified:
This was the original question:
Lowercase problems...Question: I'm working on a program for changing uppercase letters to lowercase. This is what I have so far:
class lowercase
Set objFileSystem = CreateObject("Scripting.fileSystemObject");
Set objOriginalFile = objFileSystem.OpenTextFile(OriginalFile,1,True)
Reader = objOriginalFile.ReadAll;

LowerCaseReader = LCase (Reader);
Set objEndFile = objFileSystem.OpenTextFile(EndFile,2,True);
objEndFile.Write LowerCaseReader;
Set objEndFile = Nothing;
Set objOriginalFile = Nothing;
Set objFileSystem = Nothing;
And these are the errors I'm <identifier> expected
Reader = objOriginalFile.ReadAll;
      ^ <identifier> expected
objOreginalFile.Close;// read from the file then close the file
                     ^ <identifier> expected
LowerCaseReader = LCase (Reader);//converts all to lower Case
               ^ <identifier> expected
objEndFile.Close;//write all to the end file
4 errors
Along with the obvious errors up top, I have researched the answers on how to create a file .TXT, but am very unsure of how to do it. Keep in mind, I'm running Coderunner (MAC) and don't know if it can import/export to a file.
Thanks, this is the last program I HAVE to do, so now I can start doing programs I want to do!"

And this was the proposed solution:
"This one does what you want:

public class LowerCase{
public static  void toLowerCase(String inFile, String outFile) throws IOException {

                  BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(inFile)));

                BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(inFile)));
                 out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile)));

                String line;
                while((line = in.readLine()) != null)
                      out.write(line.toLowerCase() + "\n");


      public static void main(String[] args) {

        toLowerCase("input.txt", "output.txt");
        }catch(Exception ex){


But this is what I need:
The program needs to read an input file and write it to an output file. In other words it should create an input file by typing one not by typing into the file from the program.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros