Page 1 of 1
File Name In Post Build Events?
Posted: Sun Jun 18, 2017 7:06 pm
by TheBrittleTechWriter
How can I get the file name of the just-build file? I want to pass that to the .bat file.
Re: File Name In Post Build Events?
Posted: Sun Jun 18, 2017 9:07 pm
by GregStenhouse
Pass the output directory to your script in the build event in Flare, e.g.
"post_publish_script.bat" "$(OutputDirectory)"
Then use %1 in your .bat file to grab the name of the file, e.g if it's a PDF:
Code: Select all
for %%F in ("%1\*.pdf") do (
set "NAME=%%~nF"
)
echo %name%
pause
Re: File Name In Post Build Events?
Posted: Tue Jun 20, 2017 7:36 am
by TheBrittleTechWriter
Excellent! Thanks.
DOS programming has returned.