Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

2015-CLIENTA-05DATA.xml
2015-CLIENTB-10WIDGETS.xml

The following code:

Panel
cd src=c:\data
forfiles src=2015-*-??*.xml
 echo "FILE Name = $(_file)"
 echo "WC 1 = $(_file.wildcard0)"
 echo "WC 2 = $(_file.wildcard1)"
 echo "WC 3 = $(_file.wildcard2)"
 echo "WC 4 = $(_file.wildcard3)"
end


Will result in:

Panel
FILE Name = 2015-CLIENTA-05DATA.xml
WC1 = CLIENA
WC2 = 0
WC3 = 5
WC4 = DATA
FILE Name = 2015-CLIENTB-10WIDGETS.xml
WC1 = CLIENB
WC2 = 1
WC3 = 0
WC4 = WIDGETS


Example 2

Given a file name of 0123456789abc.xml:

A pattern of *???.xml would yield:

Panel

...

$(_file.wildcard0) -> 0123456789
$(_file.wildcard1) -> a
$(_file.wildcard2) -> b
$(_file.wildcard3) -> c



A pattern of ???*.xml would yield:

Panel

...

$(_file.wildcard0) -> 0
$(_file.wildcard1) -> 1
$(_file.wildcard2) -> 2
$(_file.wildcard3) -> 3456789abc



A pattern of ?*?.xml would yield:

Panel

...

$(_file.wildcard0) -> 0
$(_file.wildcard1) -> 123456789ab
$(_file.wildcard2) -> c



A pattern of ?*?*?*?.xml would yield:

Panel
$(_file.wildcard0) -> 0
$(_file.wildcard1) -> 123456789
$(_file.wildcard2) -> a
$(_file.wildcard3) ->
$(_file.wildcard4) -> b
$(_file.wildcard5) ->
$(_file.wildcard6) -> c