Copy a file into a Folder with timestamp
<p>I'm stuck now with following problem. (i googled but didn't find a solution for that)</p>

<p>The thing is i want to copy a file in to a folder with a variable in the name of the folder. The variable is a timestamp. How can i do this? </p>

<p>Here is my code:</p>

<pre><code>datetime_ordner = time.strftime("__%d_%m_%y-%H-%M")
dir = mkdir('test' + str(datetime_ordner))
data_xls = pd.read_excel('test.xls')
data_xls.to_csv('test_daten' + str(datetime) + '.csv')
shutil.copy2('test_daten.csv', '/',dir(),'test' + str(datetime) + '.csv')
</code></pre>

<p>I tried it ofer shutil but it wont work. I'm sorry if this may be a stupid question but I couldn't figure it out on myself.</p>