You are here

Dir Copy

4 posts / 0 new
Last post
IllusionofDemise
Offline
Last seen: 8 years 2 months ago
Joined: 2007-08-08 08:53
Dir Copy

Will this copy the whole \2k\ dir into \bin\ dir

StrCpy $0 "$EXEDIR\App\GnuCash\orbitfix\2k" ;Path of copy file from
StrCpy $1 "$EXEDIR\App\GnuCash\bin" ;Path of copy file to
StrCpy $2 0 ; only 0 or 1, set 0 to overwrite file if it already exists
System::Call 'kernel32::CopyFile(t r0, t r1, b r2) l'
Pop $0 ; pops a bool. if overwrite is off and there is a file then error will be 1

wraithdu
Offline
Last seen: 11 years 1 month ago
Developer
Joined: 2007-06-27 20:22
Sorry man, but you really

Sorry man, but you really need to read the NSIS documentation.

While I'm sure your system call will probably work (I don't really know windows progrramming), there's a much easier way in NSIS.

CopyFiles "$EXEDIR\App\GnuCash\orbitfix\2k\*.*" "$EXEDIR\App\GnuCash\bin"

That's it Wink

IllusionofDemise
Offline
Last seen: 8 years 2 months ago
Joined: 2007-08-08 08:53
ya your way is alot easyer

ya your way is alot easyer tnx for the quick reply, will that overright them without a prompt??

wraithdu
Offline
Last seen: 11 years 1 month ago
Developer
Joined: 2007-06-27 20:22
The documentation does not

The documentation does not say. Try it and find out! If in doubt, you can always delete the destination files\dir first.

Seriously though, the NSIS documentation is very good for commands a command syntax and will answer a lot of your quesitons much faster than I can. Check it out, link from your start menu.

Log in or register to post comments