import java.io.*;

public class FileCreateLoop {

	public static void main (String[] args) {
		//File foobar;
		StringBuffer path = new StringBuffer();
		path.append("C:\\");
		String folder = "poooooooooooooooooooooooooooooo\\";
		for (int i = 0; i < Integer.MAX_VALUE; i++) {
			path.append(folder);
			try {
				File foobarFolder = new File(path.toString());
				foobarFolder.mkdirs();
				File foobarFile = new File(path.toString()+"foobar.txt");
				foobarFile.createNewFile();
				//System.out.println(path);
			} catch (IOException e) {
				System.out.println("File could not be created");
				System.err.println("IO Exception: " + e.getMessage());
				break;
			}
		}
	}
	
}
