I want to create file according to data.If file exists of todays date then it must not create file .I have written some code
 path.exists('./LOG/BAlDate-Info' +Date()+'.txt', function(exists) {
    if (!exists) {
        fs.writeFile('./LOG/BALDate-Info' +Date()+'.txt',"BAl-Employee  is called  @  "+    Date(),function(err){
            if(err){
                console.log("error is: " + err)
            }
            else
                console.log("no error found");
        });
    }
});
In this case every time i run this code it creates file but i want to create just single file of of todays date. Please help me out in this case
				
				One option would be to name your logfile like this:
var now = new Date();
var logfile_name = './LOG/BALDate-Info-' + now.getFullYear() + "-"+ now.getMonth() + "-" + now.getDay() +'.txt'
your file should look like './LOG/BALDate-Info-2013-4-2.txt'