Archive: File: failed opening file


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.


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


Thanks for that.
Out of interest - any idea why this works on XP with the same path?


Perhaps your XP path is shorter than your 2003 path? If not then maybe something else is at fault here.

Stu


well the paths are relative, so in both cases the filepath is the same length - 202 characters


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.


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


Ah! I get it now
cheers