Using PythonWin 2.7.10, I would like to append a date to a bunch of zipfiles in a folder. I've been using the time module which prints the current month, day and year. But, I'm not sure how to append this date to the end of my zipfiles' file name. In this case I've been running tests on the WillCounty_PLSS.zip file, which contains a shapefile.
This script seems to work, but it creates an odd looking file with no content:
<SPAN class="keyword token">import</SPAN> time
<SPAN class="keyword token">import</SPAN> arcpy
<SPAN class="keyword token">from</SPAN> arcpy <SPAN class="keyword token">import</SPAN> env
ws <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>env<SPAN class="punctuation token">.</SPAN>workspace <SPAN class="operator token">=</SPAN> r<SPAN class="string token">'\\gisfile\GISstaff\Jared'</SPAN>
current_time <SPAN class="operator token">=</SPAN> time<SPAN class="punctuation token">.</SPAN>strftime<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"%m%d%Y"</SPAN><SPAN class="punctuation token">)</SPAN>
output_name <SPAN class="operator token">=</SPAN> <SPAN class="string token">"WillCounty_PLSS.zip"</SPAN> <SPAN class="operator token">+</SPAN> current_time
output_file <SPAN class="operator token">=</SPAN> open<SPAN class="punctuation token">(</SPAN>ws <SPAN class="operator token">+</SPAN> output_name<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"w"</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN> current_time<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Here's how the file was named: JaredWillCounty_PLSS.zip02072018
EDIT: What do I need to do to have the look like this: WillCounty_PLSS_02072018.zip?