Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: FileItemize DirItemize Wild Card Wildcard File Mask IntControl 91
DirChange('C:\') DirName = 'TestWild' Cnt = 0 While DirExist(DirName) Cnt = Cnt+1 DirName = DirName : Cnt EndWhile DirMake(DirName) DirChange(DirName) DirMake('Te.st') FilePut('Te.st.txt', '0') For Cnt = 1 To 3 DirMake('Te.st' : Cnt) FilePut('Te.st' : Cnt : '.txt', '0') Next Files = FileItemize('Te.st*.*') Dirs = DirItemize('Te.st*.*') ; Returns "" FileCnt = ItemCount(Files, @TAB) DirCnt = ItemCount(Dirs, @TAB) ; Result ---> FileCnt==4, DirCnt==0 Pause(`DEBUG PAUSE`, StrCat(`FileCnt = `, FileCnt, @CRLF, `DirCnt = `, DirCnt)) DirRemove('Te.st') For Cnt = 1 To 3 DirRemove('Te.st' : Cnt) Next FileDelete('*.*') DirChange('C:\') DirRemove(DirName) :CANCEL ReturnBut if you change "Te.st" to "Test" they are. I came across this problem when processing some folders that had a "." in the folder name. The folders being processed had a common base name but not all folders were being processed. When I removed the "." from the folder names all the folders were processed as expected.Modify message
There is a simple rule for wildcard pattern matching involving the period character and either DirItemize or FileItemize. That rule being that you can't have more period characters in your wildcard pattern than exist in each name you want to match.
Article ID: W18508
Filename: Wildcarding with FileItemize and DirItemize .txt
File Created: 2014:07:09:09:21:58
Last Updated: 2014:07:09:09:21:58