@echo off

set vivado_path=C:\Xilinx\Vivado\2023.2\bin

set my_path=%~dp0
set my_name=%~nx0

echo Please enter a project name.
echo.
echo Project names must start with a letter (A-Z, a-z) and must contain
echo only alphanumeric characters (A-Z, a-z, 0-9) and underscores (_)
echo.
set /P proj_name=Project name: 

if exist %vivado_path%\ (
	"%vivado_path%\vivado" -nolog -nojournal -mode batch -source "%my_path%create_project.tcl" -notrace -tclargs %proj_name%
) else (
  echo.
  echo Error:
  echo Directory "%vivado_path%" not found.
  echo Please edit %my_name% to set the Vivado installation path.
  echo. 
)

cmd /k