<div class="blockcode"><blockquote> pdir[0]='\0';
ptxt[0]='\0';
sprintf((char*)pdir,"0:DATA%02d",dirnum);
sprintf((char*)ptxt,"0:DATA%02d/%02d.txt",dirnum,txtnum);
f_mkdir((const TCHAR*)pdir);
f_opendir(&dir, (const TCHAR*)pdir);
res= f_open(&MyFile, (const TCHAR*)ptxt,FA_OPEN_ALWAYS | FA_WRITE);
bytesWritten=MyFile.fsize;
res=f_lseek(&MyFile,bytesWritten);
res= f_write (&MyFile, adcx, sizeof(adcx), (void *)&bytesWritten);
res=f_close(&MyFile);
dirnum++;
txtnum++; |