Sure, but it’s kind of a cheat, so you will have to edit some of the lines.
REM Project must be in FirstName LastName\Documents\Unreal Projects to work
@echo off
set /p projectName="Enter Project to generate files: "
“C:\Program Files\Epic Games\UE_4.20\Engine\Binaries\DotNET/UnrealBuildTool.exe” -projectfiles -project=“C:\Users\FirstName LastName\Documents\Unreal Projects%projectName%%projectName%.uproject”
@pause
The parts you have to edit should be obvious.
EDIT:
When executing the batch file, you just have to type in the name of your project, such as “BestProject”. Do not specify a path, just the name of the project. This batch file will look it up for you if you specified the path in the batch file correctly.