Old 8th July 2010, 09:08   #1
paulwoods
Junior Member
 
Join Date: Jul 2010
Posts: 5
File: failed opening file

I am trying to package up some javascript files using File to copy the contents of a directory.
This is working fine on XP, but on our build server which is windows 2003 I get a 'failed opening file' message trying to copy this path:

"..\..\..\windows\runtime\middleaaaa\aaacache\aaaaaaaaaa.stage.af1.aaaaaaaaaaa.com\%47com%47bbbbbbbbbbb%47js%47ccccccccl%47client%47application%47timeshift%47TimeshiftControlPanelCatchUpSubController.js"

Is this because the path is too long? I can't believe it is because of the strange characters in the path since the other files in this directory are copying OK.
If I can't copy this file, can I recover from the error and carry on with the next file?

The script I am using is:
SetOutPath $INSTDIR\middleware
file /nonfatal /r ..\..\..\windows\runtime\middleware\*.*

thanks in advance.

Last edited by paulwoods; 8th July 2010 at 09:48. Reason: added script
paulwoods is offline   Reply With Quote
Old 8th July 2010, 10:48   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,382
Yes it sounds like the path is too long to me. What happens if you install to C:\mw for example (i.e. shorter path)? Also if you don't mind skipping the failed extract (which is not possible as-is I'm afraid) then how about not extracting the file at all (use /x)?

Stu
Afrow UK is offline   Reply With Quote
Old 8th July 2010, 13:12   #3
paulwoods
Junior Member
 
Join Date: Jul 2010
Posts: 5
Thanks for that.
Out of interest - any idea why this works on XP with the same path?
paulwoods is offline   Reply With Quote
Old 8th July 2010, 13:15   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,382
Perhaps your XP path is shorter than your 2003 path? If not then maybe something else is at fault here.

Stu
Afrow UK is offline   Reply With Quote
Old 8th July 2010, 13:57   #5
paulwoods
Junior Member
 
Join Date: Jul 2010
Posts: 5
well the paths are relative, so in both cases the filepath is the same length - 202 characters
paulwoods is offline   Reply With Quote
Old 8th July 2010, 14:12   #6
paulwoods
Junior Member
 
Join Date: Jul 2010
Posts: 5
I managed to get this working by reducing the relative paths - from ../../../windows/runtime
to just ../

So I guess it was the path length. Strange that XP coped better than Server 2003 though.

Thanks for your help Stu.
paulwoods is offline   Reply With Quote
Old 8th July 2010, 14:44   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,382
Ah but that is a relative path at compile time. The path at run time would probably be $INSTDIR\middleware\..\..\..\windows\runtime\middleaaaa\aaacache\aaaaaaaaaa.stage.af1.aaaaaaaaaaa.c om\%47com%47bbbbbbbbbbb%47js%47ccccccccl%47client%47application%47timeshift%47Ti meshiftControlPanelCatchUpSubController.js

Stu
Afrow UK is offline   Reply With Quote
Old 8th July 2010, 16:28   #8
paulwoods
Junior Member
 
Join Date: Jul 2010
Posts: 5
Ah! I get it now
cheers
paulwoods is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump