Some time, the department received a task, request to the company's existing video file data to do a statistical sorting work.
The leader called the meeting, asked: Two weeks time enough?
The first step in statistical sorting is to enter the video file name source category information into the Excel table in order to do the next work.
Everyone looked at each other, manually copy the video file name pasted into the Excel table, time-consuming, data accuracy is not too high.
I volunteered, I'll take care of this step.
Batch-processing code:
-------------------------------------------------------
DIR/S/b >>videolist.txt
------------------------------------------------------
After saving this line of code to a TXT document, change the suffix to. bat and put it in all directories in the video file, and the problem is resolved successfully.
Note:
1. The efficiency of batch processing was not too high, and I later rewritten the code with PowerShell. PowerShell is the next generation batch that Microsoft launches.
2. The code search generates a plain text file named "VideoList.txt" that contains all the video file names and is imported into an Excel spreadsheet to perform the next step of sorting.
Dir: A line of code that extracts all the video file names and paths