Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 1
    What filename are you entering as input? Commented Nov 8, 2018 at 5:04
  • Should work the exact same. User input or not Commented Nov 8, 2018 at 5:05
  • I tried everything, but I tested it using TestFile123 and or even TestFileName, in theory the concatenation should change it to TestFile123.txt or TestFileName.txt, correct? Commented Nov 8, 2018 at 5:06
  • Could it be related to flushing/closing the File object? Just throwing an idea.. Commented Nov 8, 2018 at 5:07
  • 1
    Try printing fileName before adding in File. Commented Nov 8, 2018 at 5:08