Batch or CMD file naming for log files


::Log Filename & Folder
::::::::::::::::::::::::::::::::::::::::::::::::::::Set FP to current Directory Path of executable '0' and file Name and append _LOGS
set fp=%~dp0%~n0_Logs\                           
::::::::::::::::::::::::::::::::::::::::::::::::::::Make the file path - will complain and skip if exists
@mkdir %fp%
::::::::::::::::::::::::::::::::::::::::::::::::::::Set variable to be the log file name and use that
SET LOG_FNAME=%fp%%USERNAME%@%COMPUTERNAME%.log  


Comments

Popular posts from this blog

Revit area plans adding new types and references (Gross and rentable)

Powerpoint countdown and current time in slides VBA

Revit Python in Visual Studio Revit Stubs 2022 for Python Revit Intellisense