Kash
Kash

Reputation: 17

Can I use wild character in file path for NSIS CopyFiles command?

I want to copy files during installation to a folder. The path of the folder contains say build number and its not constant.

CopyFiles "E:\Source\*.jar" "E:\Destination\Myfiles_22.14.03.25\here"

Something like above but my code cannot use absolute path as the version string will change. IS there some way of using wild character * in the file path (E:\Destination\MyFiles_*\here) and copying files there?

Upvotes: 0

Views: 587

Answers (1)

Anders
Anders

Reputation: 101764

The NSIS CopyFiles instruction is a thin wrapper around the SHFileOperation function and according to MSDN, wildcards are only supported in the file-name portion of the source path.

To search for files and folders on the end-users system you can use the FindFirst, FindNext and FindClose instructions...

Upvotes: 2

Related Questions