I searched for a standard format for using a date/time as part of a file name and was unable to come up with anything.
My question is two parts:
Is using a time stamp to enforce unique file names a poor practice?
Não, tudo bem.
I could get the time from the creation date and serialize the file names (file0001.bak, file0002.bak, etc)
Numerá-los sequencialmente é mais trabalho. Pense no timestamp como uma numeração crescente, mas não sequencial.
but just including the time stamp lets perform file operations such as mv 2011-01* somewhere/. Is there a downside to using this type of naming system?
Não, é feito o tempo todo.
The format I am using is YYYY-mm-dd_HH-MM-SS.
Isso é bom, porque eles irão classificar em ordem cronológica. Eu perderia o sublinhado, só porque é mais fácil digitar um hífen.
Is there a better format I should be using?
Não realmente.