If you need separate directories then make sure the names are unique, if separate files is sufficiënt then use unique file names. I usaully take eithe the name of the fileand append the datetime up to milliseconds for the file names or use a java UUID for the names of the files. The same is true for the folders. See below for use of UUID:
import java.util.UUID; UUID uniqueID= UUID.randomUUID(); String randomUUIDString = uuid.toString();
File documents are stored and retrieved by the runtime. In the Mendix cloud, it is not allowed to write to the file system directly.
What do you want to achieve? It sounds like some kind of temporary storage.