Building a file

  • 20
Let's build a file from various pieces. Read file names from the console. Each file has a name: .partN. For example, Lion.avi.part1, Lion.avi.part2, ..., Lion.avi.part37. The file names are supplied in random order. The word "end" is used to stop reading in file names. In the folder where
You can't complete this task, because you're not signed in.
Comments (7)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Jurij Thmsn
Level 22, Flensburg, Germany
14 April, 14:18
Easier than I thought. One thing I misunderstood first: The filenames are entered line by line in the console, not with a comma like it is written in the example. like: /Users/test/Desktop/Folder/Lion.avi.part1 /Users/test/Desktop/Folder/Lion.avi.part2 ... end
Isma
Level 31, Madrid, Spain
30 December 2020, 08:39
Okay mates, don't f***** miss the point in ".<partN>".
Andrei
Level 28
28 January, 15:07
lol, thanks!
MoJo
Level 22, Cairns, Australia
16 December 2020, 12:02
Do not add a new line or anything between the files, even if it looks weird when testing.
Switch/Cypher
Level 25, Bexleyheath, United Kingdom
7 October 2020, 18:41
"For example, Lion.avi." The dot at the end of this is a FULL STOP, not part of the filename that you need. The Filename should just be "Lion.avi"
Mateusz
Level 29, Poland
14 September 2020, 21:32
If you have problems soloving this task, think carefully if you really need to use the "append" function when outputting.
Adrian
Level 24, Spanish Town, Jamaica
24 August 2020, 03:54
This drove me insane, i think codegym needs to declare in the conditions which classes aren't allowed. for anyone else wondering, for some reason the vallidator does not want you to use the Java.io.File class, or at least some of the methods therein, i went mad trying to figure out why the output of my code was correct but it kept insisting i didn't close streams. whew.