%GetFolder%    Show Routine Code    Author: Siegfried


Version: 1  -  Date: 2007-04-20

 

Example calls:
%GetFolder% "SourceDirectory" "TargetDirectory"
%GetFolder%

Remarks:
The "%GetFolder%" routine is the main instrument to copy files to the plugin. It works like xCOPY but allows for cleanup of unwanted files and derives Source-Target from the script environment where possible. The variables "%MainExe%" and "%SubDir_Of_MainEXE%" are used for this if "%GetFolder%" is called without parameters.

Any source-target may be specified and the "Exclude-ButKeep" feature is used to clean out the unwanted files.

If "%GetFolder%" is used without parameters, "%ProgPath% - Files" are assumed as "Source - Target".
If %Progpath% is not defined yet, a call on %GetProgpath% is internally done by %GetFolder%. So the following type of call is normally all, thatīs needed to copy the files:

set Exclude=*.txt,*.chm,Lang\*.lng,*uninstall*.*,Links,Skins\*.skn,
set ButKeep=Lang\%LANG%.lng,%LANG%.chm,ReadMe.txt,Skins\default.skn,
%GetFolder%

Use the "%Exclude% - %ButKeep%" feature to cleanUp the target folder:
set Exclude=Lang\*.awl,
set ButKeep=Lang\%LANG%.awl,
%GetFolder%

This will only keep "Files\Lang\german.awl" on a german system.
The Exclude-ButKeep feature provides a simple way to remove any unwanted files from the target folder.
Specify any number of exclusions delimited by comma ",".
%ButKeep% can only be used together with %Exclude%. It is used to define one or several exceptions for a bulk-exclusion. A typical usage is in the context of language files cleanup.

The Exclude-ButKeep feature is available for the following routines:
%GetFolder%, %xDWLD% and %Extract%