CREATE DOS COMMAND DIR BY C
Step 1: Write following code.
void main(int count,char *argv)
struct find_t q ;
a = _dos_findfirst(argv,1,&q);
printf(" %s\n", q.name);
a = _dos_findnext(&q);
printf("File not found");
Step 2: Save the as open.c (You can give any name)
Step 3: Compile and execute the file.
Step 4: Write click on My computer of Window XP operating system and select properties.
Step 5: Select Advanced -> Environment Variables
Step 6: You will find following window:Click on new button (Button inside the red box)
Step 7: Write following:
Variable name: path
Variable value: c:\tc\bin\open.c (the path where you have saved)
Step 8: Open command prompt and write list and press enter button.