if is around test data from the original data in eien seperaten working folder / test Folder to copy.
The function is summarised after the condition into a block.
Because the function still settings stands Needed this before the end of her Settings
It looks unusual a little bit, but I use this for two reasons:
1. to the testing of Scripts with echo ON
2. the function is in the Script directly under it
3. at the end of the function is nobody - goto:Label_behind_function inevitably
4. the block with the Subroutine is jumped over after the implementation because of the condition
5. with will test only the line IF Especially indicated
6... thereby point I as far script has come
the command IF compares both expressions and becomes only if the condition is true execute the sequence command.
The command IF still has a specific feature:
If the first printout to be compared begins with a colon, everything becomes between to the expressions including those not indicated.
The CMD parser reads in the complete IF - command line, around this with echo ON before to indicate the instruction execution nocheinmal.
Oh, I see with the Asterisk - does not become as a command parse him can exist, because no file may include.
Thereby becomes with echo ON in the batch from
Code: Select all
if :String1==String2 * small explanation * & @(command...)
Theoretically every subroutine is able with it in script direct after call
and all closing parenthesis (level 0) are attached.
The Script automatically assigns a disk drive letter, with it with this virtual disk drive it can be gone on working.
Of the 2nd par offices is transmitted in double percent signs, because in call is reduced to one percent sign.
the argument (variable) thereby becomes only in the subroutine Expanded.
A variable the virtual disk drive is created with the letters, with it all created allocations again are lifted
The variables Q and R are created with the virtual disk drive letters and are used in the rest of the Script
list in the files in %tempfolder%
The files can delete by the command before him are indicated:
Code: Select all
rd /S /Q "%tempfolder%"
Thanks, the beer was very good