Skip to content

Commit

Permalink
Added ability to overwrite files during copying
Browse files Browse the repository at this point in the history
  • Loading branch information
tddesjardins committed May 31, 2018
1 parent b8e3576 commit 4415c5b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions notebooks/acs_subarrays.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@
"\n",
"files = glob.glob('mastDownload/HST/*JMQ/*.fits')\n",
"for f in files:\n",
" shutil.move(f, '.')\n",
" try:\n",
" shutil.move(f, '.')\n",
" except:\n",
" os.remove(f.split('/')[-1])\n",
" shutil.move(f, '.')\n",
" \n",
"shutil.rmtree('mastDownload')"
]
Expand Down Expand Up @@ -196,9 +200,13 @@
"\n",
"files = glob.glob('mastDownload/HST/*w6q/*.fits')\n",
"for f in files:\n",
" shutil.move(f, '.')\n",
" try:\n",
" shutil.move(f, '.')\n",
" except:\n",
" os.remove(f.split('/')[-1])\n",
" shutil.move(f, '.')\n",
" \n",
"#shutil.rmtree('mastDownload')"
"shutil.rmtree('mastDownload')"
]
},
{
Expand Down

0 comments on commit 4415c5b

Please sign in to comment.