File Name In Post Build Events?
-
- Propeller Head
- Posts: 28
- Joined: Wed Feb 15, 2006 12:58 pm
- Location: Chicago, IL
- Contact:
File Name In Post Build Events?
How can I get the file name of the just-build file? I want to pass that to the .bat file.
-
- Sr. Propeller Head
- Posts: 330
- Joined: Tue May 13, 2008 3:27 pm
- Location: Christchurch, New Zealand
Re: File Name In Post Build Events?
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:
"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
-
- Propeller Head
- Posts: 28
- Joined: Wed Feb 15, 2006 12:58 pm
- Location: Chicago, IL
- Contact:
Re: File Name In Post Build Events?
Excellent! Thanks.
DOS programming has returned.
DOS programming has returned.