changeset 418:c5ca7cbde73a

Add wildcard to enable file name substitution. Without wildcard symbol for %%x in (str) evaluate to true and return str in any case. User can write pattern without widlcard symbols (as */?).
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Tue, 04 Oct 2011 16:25:02 +0300
parents b2b52e4e4afa
children 7da781789a26
files pathsearch/pathsearch.bat
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pathsearch/pathsearch.bat	Tue Oct 04 16:21:41 2011 +0300
+++ b/pathsearch/pathsearch.bat	Tue Oct 04 16:25:02 2011 +0300
@@ -30,7 +30,7 @@
 )
 pushd %path_head% 2>nul && popd || goto :search_skip_cd
 cd /d %path_head%
-for %%f in (%pattern%) do echo %path_head%\%%f
+for %%f in (%pattern%*) do echo %path_head%\%%f
 :search_skip_cd
 if not "x%path_tail%" == "x" goto search_loop
 goto :myeof