File Name In Post Build Events?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
TheBrittleTechWriter
Propeller Head
Posts: 28
Joined: Wed Feb 15, 2006 12:58 pm
Location: Chicago, IL
Contact:

File Name In Post Build Events?

Post by TheBrittleTechWriter »

How can I get the file name of the just-build file? I want to pass that to the .bat file.
GregStenhouse
Sr. Propeller Head
Posts: 330
Joined: Tue May 13, 2008 3:27 pm
Location: Christchurch, New Zealand

Re: File Name In Post Build Events?

Post 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
TheBrittleTechWriter
Propeller Head
Posts: 28
Joined: Wed Feb 15, 2006 12:58 pm
Location: Chicago, IL
Contact:

Re: File Name In Post Build Events?

Post by TheBrittleTechWriter »

Excellent! Thanks.

DOS programming has returned.
Post Reply