Atitit. Improved Backup File Replication speed (4) --- data mining to obtain the list of recycle bin files
1. Principle of putting data into the recycle bin and 1
2. info2 file structure 1
3. Obtain the file list. Two Methods: regular expression or parsing 1.
4. Path regular expression [A-Za-Z] \: [\ a-zA-Z0-9 \ xb0-\ xf7 \ xA1-\ xfe _. ~] + 2
5. Refer to 2
1. Principle and
The info2 file records the information of each deleted file that is placed in the recycle bin, such as the drive indicator dirve designator, the complete file name, file size, and storage location (PATH) of the original deleted file) and the time when the file is moved to the recycle bin. When an object is moved to the recycle bin, It is renamed:
D % driveletter % _ % indexnumber % _ % fileextension %.
D % driveletter %:
"D" indicates drive, % driveletter % indicates the disk where the file is stored. The first disk has its own recycler directory and info2 file.
% Indexnumber %:
Each file or folder that is placed in the recycle bin is enclosed in a pair of quotation marks to mark the order of deletion. The larger the index number, the more late the deletion. However, when the receiving site is cleared or the system restarts, the index number will be allocated again.
% Fileextension %:
The extension of the original file. When a folder is deleted, it has no extension.
For example:
After a file named hacker.txtis deleted and put into the recycling site, the file will be renamed dc2.txt. The file entry can be found in the C: \ recycler \ % Sid % \ info2 file.
Author: old wow's paw attilax iron, email: [email protected]
Reprinted please indicate Source: http://blog.csdn.net/attilax
2. info2 file structure
For more information about the info2 file structure, see (Source: www. cybersecurityinstitute. Biz ):
3. Obtain the file list using the regular expression or parsing.
Get the info2 file ..
{String S = "C: \ recycler \ S-1-5-21-602162358-1284227242-682003330-500 \ info2 ";
Core. Copy (S, "C: \ info2.txt ");
10 GBK encoder for this file ..
4. Path regular expression [A-Za-Z] \: [\ a-zA-Z0-9 \ xb0-\ xf7 \ xA1-\ xfe _. ~] +
Public static string pathexpress = "[A-Za-Z] \: [\\\\ a-zA-Z0-9 \ xb0-\ xf7 \ xA1-\ xfe _\\-'\\. ~] + ";;
5. Reference
[Batch processing] Get the file list deleted by the recycle bin-needjava-blogjava.htm
Info2-riusksk's blog-blog. htm
[Batch processing] Get the file list deleted by the recycle bin-needjava-blogjava.htm