Old 15th December 2016, 12:33   #1
dailison
Junior Member
 
Join Date: Dec 2016
Posts: 3
Question 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 is offline   Reply With Quote
Old 15th December 2016, 15:20   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,269
Your quotes are wrong in that example.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 15th December 2016, 15:25   #3
dailison
Junior Member
 
Join Date: Dec 2016
Posts: 3
Quote:
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.
dailison is offline   Reply With Quote
Old 15th December 2016, 18:31   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,269
Quote:
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.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 15th December 2016, 18:38   #5
dailison
Junior Member
 
Join Date: Dec 2016
Posts: 3
Quote:
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
dailison is offline   Reply With Quote
Old 15th December 2016, 19:17   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,269
I know you are using Windows, I asked which Windows version.

IntOp $PostCount $PostCount + 1
Anders 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