Put this code inside the action:-

char filename[1024], command[1024];
char new_dir[] = “C:\\Sample”;

/* Create a directory under root called xyz and make it the current dir */
if (mkdir(new_dir))
lr_output_message(“Create directory %s failed”, new_dir);
lr_output_message(“Created new directory %s”, new_dir);

sprintf (filename, “%s\\%s”, new_dir, “SIVA.txt”);

/* Execute a dir /b command and direct it to a new file */
sprintf (command, “dir /b c:\\ > %s /w”, filename );
lr_output_message(“Created new file %s”, filename);

return 0;