Whenever there is need to move a file to recycle bin,
- Rename it with a key and store it in the recycle bin folder,
- Also map this key with the location of the file in your text file.
Now when user asks for restore, get the exact location from txt using the key and restore it.