Questions about the recycle bin

Source: Internet
Author: User
// Delete the file to the recycle bin

API: SHFileOperation

// Clear the recycle bin

API: SHEmptyRecycleBin

// Retrieve the recycle bin Information

API: SHQueryRecycleBinA

// Restore the recycle bin File

There is an Info2 file under the recycled directory. After the file is recycled, It is renamed and saved to the file. However, the operating system and structure are different; all you need to do is traverse the content of the info2 file and move the file to the original location.

Look at the structure of v 4.

Description of offset Length

0 ~ 259,260. Name of the original file or directory. If the value of 0 bytes is 0, the parameter is invalid.

260 ~ 263, 4, file number

264 ~ 267, 4, drive disk number 0 represents A, 1 = B, 2 = c ..

268 ~ 275, 8, deletion time

276 ~ 279, 4, space occupied by files or directories (bytes, retained to "cluster ")

V5 Structure

Description of offset Length

0 ~ 259,260. The short name of the original file or directory is named 8.3. If the value of 0 bytes is 0, it indicates invalid.

260 ~ 263, 4, file number

264 ~ 267, 4, drive disk number 0 represents A, 1 = B, 2 = c ..

268 ~ 275, 8, deletion time

276 ~ 279, 4, space occupied by files or directories (bytes, retained to "cluster ")

280 ~ 799,520, full name of the original file, Unicode



In addition, I used to use delphi for this information. C # has no code for reference. Sorry.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.