1

Topic: (Python) shutil cuts off a file name part

Good afternoon. The file name part, strange is cut off, after all all is simple:

import shutil
import datetime
now = datetime.datetime.now ()
now=now.strftime ("%d- % M - % Y %H: % M")
fileName1 = './templates/4_3_EO.xlsx'
fileName2 = './templates/4_3_EO _ ' + now + '.xlsx'
shutil.copyfile (fileName1, fileName2)

As a result the file with a name 4_3_EO_13-08-2018 11 turns out
What I do not so?

2

Re: (Python) shutil cuts off a file name part

On Windows? The colon there the reserved character, is used in a disk designation.