Archive: Copying files from a network share that contains the '$' character


Copying files from a network share that contains the '$' character
I am having a problem getting NSIS to copy files from a network directory. I think the problem may be that the shared folder contains the $ character.

Here is an example of what I'm doing:

There are two machines on a local network, one is the master, and one is a secondary machine. The master machine has it's software updated normally, and the secondary machine just needs to pull the same files over the network. The master machine has it's 'D' drive shared as 'D$'

I have tried all of the following:

CopyFiles "\\MasterComputer\d$$\dir\*.*" d:\SecondaryDir

ExecWait "xcopy \\MasterComputer\d$$\dir\*.* d:\SecondaryDir"

nsExec::ExecToStack "$SYSDIR\xcopy.exe" "\\MasterComputer\d$$\dir\*.*" "d:\SecondaryDir"

And none of them will copy any files. I know the SecondaryDir is created beforehand, it just won't copy the files there. What am I doing wrong? Am I not able to do name resolution in NSIS?


Try putting that string in a message box and see what comes out.

Anyway, the solution is probably:

StrCpy $0 \\mastercomputer\d$$
CopyFiles $0\dir\*.* d:\sec