Home : General : Perl Programming :

General: Perl Programming: Re: [Andy] copying a directory and subdirectories: Edit Log

Here is the list of edits for this post
Re: [Andy] copying a directory and subdirectories
Quote:
$db_data_path => /var/home/delicia/delicia.com/cgi-bin/public/data
$backup_dir => /var/home/delicia/delicia.com/cgi-bin/public/data/backup
$new_date => 20180523

JOINED: /var/home/delicia/delicia.com/cgi-bin/public/data/backup/20180523

the joined line is perfect. i want to test if the 20180523 directory exists. if not, create it. then copy everything from $db_data_path to it.

although looking at my logic i think that's wrong maybe redundant. i don't want to copy the $backup_dir. so maybe i need to join $db_script_path instead of $db_data_path. $db_script_path is same as data_path except it doesn't have /data at the end. i just looked at my cfg and i have $backup_dir = $db_data_path . "/backup"

in other words, i could put my backup directory off script path instead of off data path OR i could leave it off data path but exclude it when i do the dircopy. i will defer to your recommendation! thanks

Last edited by:

Andy: May 23, 2018, 7:18 AM

Edit Log: