CodePudding user response:
System (" dir/b/a - d c: \ \ *. * & gt; D: \ \ allfiles TXT ");//read file d: \ \ allfiles TXT content of C: \ \ under the names of all files
System (" dir/b/a - d/s c: \ \ *. * & gt; D: \ \ allfilesinsub TXT ");
//read file d: \ \ allfilesinsub TXT content that is C: \ \ under the names of all files contain subdirectories
System (" dir/b/active directory c: \ \ *. * & gt; D: \ \ alldirs TXT ");
//read file d: \ \ alldirs TXT content of C: \ \ under the names of all the subdirectories
Please remember, can use the shell command to get the file and folder information or manipulate files, folders had better use the shell command to get or operation, and don't use all sorts of API access to or operation, because when it comes to illegal folder name or illegal filename or illegal file length, illegal file date, compressed file, link files, sparse file... All sorts of unexpected situations, such as API can deal with incomplete or into an infinite loop, and shell commands not,
If disrelish black window system that the system ("... ") is replaced by WinExec (" CMD/c... ", SW_HIDE);
CodePudding user response:
Only one by one, or import the database to readCodePudding user response:
Read one by one,,,,CodePudding user response:
Multi-threaded read?CodePudding user response:
To iterate over, read one by one, or multiple threads, each thread reads a fileCodePudding user response:
Want to the only one by one