I am writing a launcher and have a question about moving files. I need to be a able to move files from the settings directory to the app directory in order for the program to work. I've been looking at the SumatraPDF source to be able to do that. The problem is that the files that need to be moved could have any file name. The extension on the file name will always be the same.
Example: I need to move all files with the extension .skn from the settings folder to the app folder when the program is launched and back to the settings folder when the program is closed.
The Sumatra launcher just does a single file, so I don't really know what I need to do. Any help would be appreciated. Thanks
I think something like this would work
of course you would need to follow this up with a command to delete all .skn files from whichever directory was the starting directory.
The developer formerly known as ZGitRDun8705
I'm just starting to use NSIS, so I don't know all the commands. If I wanted to copy all the .skn files from the settings folder to the app folder on open and then copy them back on close, what would I have to do? Is there a launcher somewhere I could look at?
Edit: I noticed in the sumatra launcher that John used the Rename command instead of Copy. Does this eliminate the need to delete the files?
AFAIK Rename only works on single files, not on a group of files, which is why I used CopyFiles instead. I'm not sure of a launcher that has an example where CopyFiles is used, followed by the Delete command.
The developer formerly known as ZGitRDun8705
So what would the command be to delete the files from the app directory after the program is closed?
You could try to just use
just to check if it works or not, but I don't believe it will. Otherwise, use the code Bruce provided to do the delete.
The developer formerly known as ZGitRDun8705