File Data Recovery is a Python-based tool designed to recover files and folders from a source directory to a destination directory. This utility supports the following features:
Directory and File Recovery: Recovers entire folders or specific files while preserving the original directory structure. File Type Filtering: Optionally filters files by their extensions for selective recovery. Unique Filename Handling: Avoids overwriting by generating unique filenames if necessary. Path Shortening: Ensures that file paths do not exceed the maximum length limits. Free Space Check: Verifies that there is sufficient free space on the destination drive before starting the recovery process. Logging: Provides detailed logging of the recovery process, including successful and failed operations. Use this tool to efficiently recover lost or accidentally deleted files while maintaining their original structure and organization.
No external packages are required for this script.
Step 1: Go and open "folder_map_finder.py" and Please specify a folder to search and use double '\' like D:\\G\\Myfolder
Step 2: Run the code on Visual Studio or IDE or command
Step 3: Control your "folder_map_finder.py" folder it creates logs until you stop the code.
Step 4: Stop until you specify to recover folder or file in log or if you remember the name you can check from "folder_map_finder.py" directory_to_scan = "D:\G\Your_folder" or "D:\G\Your_file.jpg", ...vs.
Step 5: If you want to recover a folder Use the "folder_map_finder.py" and create a log that you can see the main file system recover folder.
Step 6: If you want to recover just 1 File (.Jpg, jpeg, .exe , .psd ,....vs. all file format) go to "File_Data_Recovery.py"
Folder name must be like this : >> D:\FOLDER_NAME not the >> D:\FOLDER_NAME\
Hope this helps!
#Folder or File Name
directory_to_scan = "D:\\G" # Replace with your target directory
folder_to_recover = "Your Destination Place" # Replace with the folder you want to recover
recover_single_file(folder_to_recover, destination_directory)