0

I am quite new to scripts so I am mostly googling things, but I was unable to find exactly what I am looking for. I need script that will write output to file with current date as name. But this file has to be created as new everyday by running this script.

So I am looking for something that will automatically create file with current date as name and then my already created script will write output into that file.

My script is:

%ECM_ARCHIVE_SERVER%\bin\profile.bat
%ECM_ARCHIVE_SERVER%\bin\dsCD.exe -size > D:\....\.....\(automatically created file with date as name) <- created before.

Thanks for any advices.

Robert
  • 7,667
  • 3
  • 33
  • 51
Dusan
  • 1
  • https://serverfault.com/questions/16706/current-date-in-the-file-name/960498 – spikey_richie Jun 29 '21 at 08:19
  • Hi, it kinda answer my question but still struggling with implementing this into my script. Because it created file but it didn´t output from my script is not written into this file. – Dusan Jun 29 '21 at 08:48
  • @spikey_richie All the linked answers don't work as expected if your date format is not as expected by the author (American date format?). The reason for this is that `%DATE%` always returns the date in local format but the string manipulation commands to reflect those differences. – Robert Jun 29 '21 at 09:06

0 Answers0