2

I am using VS2015, common C++ project. Is it possible to add current time or date or timestamp to the name of the output directory?

For example: I press the "Build" button at 15:23:45 and the .exe file outputs to the /bin/2016_02_29-15_23_45.

Anton Egorov
  • 101
  • 1
  • 8

1 Answers1

1

An alternative solution is to add a post-build event running a script adding a folder link named with your timestamp and targeting the output folder.

For the timestamp, follow this link

Something like that :

 set timestamp= ...
 mklink /D %timestamp% %1

Invoke this script passing as first the wanted vs2015 var, myscript.bat ${OUTPUTFOLDER}

NB: You may need to have admin permissions to invoke mklink

Community
  • 1
  • 1
norisknofun
  • 859
  • 1
  • 8
  • 24
  • Thanks for the answer, we are using your solution now. But I am interested if it is possible to do only via Visual Studio without external scripts. Mark as accepted unless there will be a more appropriate answer. – Anton Egorov Mar 09 '16 at 17:40