Skip to content
⌘ NSIS Forum Archive

Problem with files

6 posts

dailison#

Problem with files

Hello,

I need to use that command

CopyFiles "$INSTDIR\Json.dll" $INSTDIR\"Newtonsoft.Json.dll"

But it not work, because the name "Newtonsoft.Json.dll" have to dots "."

How i can make that?
dailison#
Originally Posted by Anders View Post
Your quotes are wrong in that example.
Sorry...

If i change the dot in the file name
Example Work:
CopyFiles "$INSTDIR\Json.dll" "$INSTDIR\Newtonsoft_Json.dll"

Example Not Work:
CopyFiles "$INSTDIR\Json.dll" "$INSTDIR\Newtonsoft.Json.dll"

Example2 Not Work
File Newtonsoft.Json.dll

Example 4 Work
File Newtonsoft_Json.dll

That is my problem.
Anders#
Section
InitPluginsDir
CopyFiles "$ExePath" "$PluginsDir\Newtonsoft.Json.dll"
MessageBox mb_ok "Check $PluginsDir"
SectionEnd
works fine for me on Windows 8.

Anyway, CopyFiles uses SHFileOperation internally and it is possible that Windows is being "helpful" here. Which Windows version are you using?

You can try CopyFiles with a simple name and then use the Rename instruction to set the final name. Rename does not use the shell so there should be fewer name restrictions.
dailison#
Originally Posted by Anders View Post
works fine for me on Windows 8.

Anyway, CopyFiles uses SHFileOperation internally and it is possible that Windows is being "helpful" here. Which Windows version are you using?

You can try CopyFiles with a simple name and then use the Rename instruction to set the final name. Rename does not use the shell so there should be fewer name restrictions.
Yes, i'm using Windows!

I'm soo stupied, rename work fine...
Thank's a lot man....
<3