Re: [Tutor] copy directory from one part to another and preserve permissions

2010-05-27 Thread Steven D'Aprano
On Thu, 27 May 2010 10:12:58 pm Norman Khine wrote: > hello, > i have this code: > > if i want to copy the 'files' directory contents and preserve > permissions is this the right way to do this? > > import shutil > path_to_old_files_dir = '/var/www/dev.site.com/htdocs/files' > path_to_new_files_dir

[Tutor] copy directory from one part to another and preserve permissions

2010-05-27 Thread Norman Khine
hello, i have this code: if i want to copy the 'files' directory contents and preserve permissions is this the right way to do this? import shutil path_to_old_files_dir = '/var/www/dev.site.com/htdocs/files' path_to_new_files_dir = '/var/www/site.com/htdocs/sites/default/files' shutil.rmtree(pat