Skip to content
⌘ NSIS Forum Archive

Copied File doesn't exist`

4 posts

JoeMcC00L#

Copied File doesn't exist`

I'm copying a file ~39 KB to the $TEMP directory in one line and in the next line I check to see if that file exists. I'm using LogicLib for the check.

CopyFiles "$EXEDIR\\..\\Apache\\httpd.conf" $TEMP
${If} ${FileExists} $TEMP(stupid slashes aren't working in this post)httpd.conf
; do nothing
${Else}
MessageBox MB_OK "Somebody forgot to set up us the bomb"
${EndIf} 
When I check later in the code however, the file is there. In order to get the above code to work, do I need to use some sort of sleep statement?

Thanks,
Joe
michaelcsikos#
The code works fine for me. Maybe try:
Sleep 200
Have you checked for errors? There shouldn't really be any as the file is available later in the script, but try it anyway:
ClearErrors
CopyFiles "$EXEDIR\..\Apache\httpd.conf" $TEMP
IfErrors 0 +2
MessageBox MB_OK "..."
Red Wine#
That issue might caused from the relative path, check out the documentation,

JoeMcC00L#
Hmmm... I never thought of the absolute path issue. Sorry for not rtfm 🙂. Would it resolve the issue if I evaluated the absolute path upon initialization and used the result in my CopyFiles line?