We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi there I need to merge some files into one Something similar to dos command ( copy *.txt merge.txt) This DOS command merge all txt files to one text file There is a way to do something like this with processing?
Thank you Dimitrios
Answers
Thank you for your answer (and for your help_)
Maybe this, public String[] list(FilenameFilter filter) is an solution How I can use this in processing?
https://forum.Processing.org/two/discussions/tagged?Tag=file.list()
I try this
import java.io.File;
File dir = new File("folderName"); File [] files = dir.listFiles();
// here, if i try to print the contents of the files list: println(dir) or println(files), i also receive errors
void setup() {
}
void draw() { for (int i = 0; i <= files.length - 1; i++)
{
} } https://forum.processing.org/two/discussion/1747/reading-filesnames-from-a-folder
I hope that there is something more... simple ;-)
GoToLoop Ι'm trying this now...
May 2015 edited May 2015 Flag We can directly get a File instance from "/data/" subfolder using dataFile() in place of dataPath()! And File doesn't need to import. It's already done by Processing!
String[] archives;
void setup() { archives = getFilesFromDataFolder(); printArray(archives); exit(); }
String[] getFilesFromDataFolder() { return dataFile("").list(); }
https://forum.Processing.org/two/discussion/15473/readme-how-to-format-code-and-text