o
    pqfØ  ã                   @   s   d dl Z d dlZdd„ ZdS )é    Nc                 C   sÞ   t j | ¡std| › dƒ‚t j |¡st  |¡ t  | ¡D ]J\}}}|D ]"}t j ||¡}t j || ¡}t j ||¡}t j |¡sGt  |¡ q%|D ]}	t j ||	¡}
t j |
| ¡}t j ||¡}t 	|
|¡ qJqt
dƒ d S )NzThe source folder 'z' does not exist.zBackup completed successfully.)ÚosÚpathÚexistsÚ	ExceptionÚmakedirsÚwalkÚjoinÚrelpathÚshutilÚcopy2Úprint)Úsource_folderÚtarget_folderÚrootÚdirsÚfilesÚdirZsource_dir_pathÚrelative_pathZtarget_dir_pathÚfileZsource_file_pathZtarget_file_path© r   ú8/workspaces/Masterarbeit/8_backup_folder/output_14_RP.pyÚbackup_folder   s&   

€ür   )r   r
   r   r   r   r   r   Ú<module>   s    