Create variable directory and incremetal files

@PaulS, hello, since you have been able to help me i ask again for your help, this time i would need to know how write a file into a directory I have created before. the trouble is I have created the directory and the file with the code lines you have shown me in messages before, but when I try to create the files in the directory, i fail.

my idea is: I create a directory that it can change when i decide to do that, and i would make a file per day, and then write on time every minute. Thanks again for your time!!

I post you the skecth:

#include <SD.h>
char dirName[8],DATO[18],fileName[8],DataString[20];
unsigned long ms=0, psd=0;
int anno=2014;
byte mese=1, giorno=2, ore=3, minu=4, sec=5;
File myFile;

void setup(){
Serial.begin(9600);
Serial.print("Initializing SD card...");
pinMode(10, OUTPUT);

if (!SD.begin(4)) {
Serial.println("initialization failed!");
}
Serial.println("initialization done.");

}

void loop(){

Serial.println("sd");

sprintf(dirName, "%d/%d/%d.txt", anno,mese,giorno); //per creare la directory
//SD.mkdir(dirName);
//sprintf(fileName,"%d.txt",giorno);// per creare il nome del file
//sprintf(DATO,"%d/%d",dirName,fileName);//per creare la location dove scrivere il file
sprintf(DataString,"%d/%d/%d %d:%d:%d ",giorno,mese,anno,ore,minu,sec);// crea la stringa da stampare su sd

myFile = SD.open(dirName);
myFile = SD.open(dirName, FILE_WRITE);
myFile.println(DataString);
if (myFile) {
Serial.print("Writing to test.txt...");
myFile.println(DataString);
//myFile.print(T,1);
//myFile.print(" , ");
//myFile.print(H);
//myFile.print(" , ");
//myFile.print(P);
//myFile.print(" , ");
//myFile.println(A);

// close the file:
myFile.close();
Serial.println("done.");
} else {
// if the file didn't open, print an error:
Serial.println("error opening test.txt");
}
giorno++;
ore++;
minu++;
sec++;

delay(1000);

}