filemasks over 172 characters fail

Jun 21, 2011
12
0
I have a machine with v15 and a machine where a v19 trial was attempted.

Ran into bug immediately - Am running script that collects all images and videos into a single filelist.

I use environment variables for my filemasks....

So:

dir /b %FILEMASK_IMAGE%;%FILEMASK_VIDEO% >filelist.txt

Which evaluates to:

dir /b *.jpg;*.jpeg;*.gif;*.png;*.bmp;*.ico;*.tif;*.tiff;*.pcx;*.art;*.cbr;*.cbz;*.mkv;*.avi;*.mp4;*.flv;*.mov;*.wmv;*.mpg;*.mpeg;*.vob;*.bdmv;*.ts;*.m2ts;*.rm;*.qt;*.asf;*.asx;*.fli;*.swf;*.m4v;*.webm >filelist.txt


.... The output ended up in a weird color (green on white) that is not even in my INI file for directory coloring, so... Where did that come from?

I did some testing. It's not the number of filename wildcard masks that is the limit; it's the total character length. The limit seems to be 172. It did not used to be 172. It really shouldn't be 172. I should be able to go to the command-line length limit, in theory. There's a lot of extensions out there.

Of course I can break this up into sub-commands, but it breaks the abstraction of "%FILEMASK_IMAGE%;%FILEMASK_VIDEO%", as well as the fact that grouping it together prevents having to add a step to sort the output alphabetically.
 
May 20, 2008
11,406
99
Syracuse, NY, USA
Something funny is going on but it's hard to say exactly what.

The first time I tried it with a mask of a little over 200 characters. The output seemed OK. Long lines are split in both examples.
Code:
v:\> dir *.abc;*.bcd;*.cde;*.def;*.efg;*.fgh;*.ghi;*.hij;*.ijk;*.jkl;*.exe;*.dll;*.doc;*.txt;*.foo;*
.bar;*.123;*.234;*.456;*.345;*.567;*.678;*.789;*.890;*.aaa;*.bbb;*.ccc;*.ddd;*.eee;*.fff;*.ggg;*.hhh
;*.iii;*.jjj;*.kkk;*.lll;*.mmm;*.nnn;*.ooo

 Volume in drive V is DATA  Serial number is c007:d3e4
 Directory of  V:\*.abc;*.bcd;*.cde;*.def;*.efg;*.fgh;*.ghi;*.hij;*.ijk;*.jkl;*.exe;*.dll;*.doc;*.tx
t;*.foo;*.bar;*.123;*.234;*.456;*.345;*.567;*.678;*.789;*.890;*.aaa;*.bbb;*.ccc;*.ddd;*.eee;*.fff;*.
ggg;*.hhh;*.iii;*.jjj;*.kkk;*.lll;*.mmm;*.nnn;*.ooo

2016-03-02  13:47  58,894  1to10000.txt
2016-02-13  13:34  0  a b c.txt
2016-03-20  13:55  0  abc.foo
2016-03-17  23:14  0  abc1.txt
2013-08-23  23:40  61,952  anagram.exe
2015-11-25  23:26  5  aslashb.txt
2015-12-03  21:20  407  colordir.txt
2016-03-03  13:40  1,469  files.txt
2016-02-06  23:12  0  fmtest.txt
2016-02-07  14:26  148,190  fmtext.txt
2016-04-20  13:52  1,238  foo.txt
2016-04-04  21:06  162,262  history.txt
2014-06-24  14:00  49,664  perffreq.exe
2015-06-12  16:04  167  remember.txt
2016-03-10  13:25  7,753  savedcsb.txt
2016-01-03  01:13  220  settimer.txt
2015-12-23  15:23  322  uhelpcd.txt
  492,543 bytes in 17 files and 0 dirs  532,480 bytes allocated
  8,562,143,232 bytes free

Then I tried it with a mask of 302 characters. See below ... DIR's header was corrupted and DIR's output format was different.
Code:
v:\> dir *.abc;*.bcd;*.cde;*.def;*.efg;*.fgh;*.ghi;*.hij;*.ijk;*.jkl;*.exe;*.dll;*.doc;*.txt;*.foo;*
.bar;*.123;*.234;*.456;*.345;*.567;*.678;*.789;*.890;*.aaa;*.bbb;*.ccc;*.ddd;*.eee;*.fff;*.ggg;*.hhh
;*.iii;*.jjj;*.kkk;*.lll;*.mmm;*.nnn;*.ooo;*.ppp;*.qqq;*.rrr;*.sss;*.ttt;*.uuu;*.vvv;.www;*.xxx;*.yy
y;*.zzz

 Volume in \\?\V:\*.abc;*.bcd;*.cde;*.def;*.efg;*.fgh;*.ghi;*.hij;*.ijk;*.jkl;*.exe;*.dll;*.doc;*.tx
t;*.foo;*.bar;*.123;*.234;*.456;*.345;*.567;*.678;*.789;*.890;*.aaa;*.bbb;*.ccc;*.ddd;*.eee;*.fff;*.
ggg;*.hhh;*.iii;*.jjj;*.kkk;*.lll;*.mmm;*.nnn;*.ooo;*.ppp;*.qqq;*.rrr;*.sss;*.ttt;*.uuu;*.vvv;.www;*
.xxx;*.yyy;*.zzz is DATA  Serial number is c007:d3e4
 Directory of  \\?\V:\*.abc;*.bcd;*.cde;*.def;*.efg;*.fgh;*.ghi;*.hij;*.ijk;*.jkl;*.exe;*.dll;*.doc;
*.txt;*.foo;*.bar;*.123;*.234;*.456;*.345;*.567;*.678;*.789;*.890;*.aaa;*.bbb;*.ccc;*.ddd;*.eee;*.ff
f;*.ggg;*.hhh;*.iii;*.jjj;*.kkk;*.lll;*.mmm;*.nnn;*.ooo;*.ppp;*.qqq;*.rrr;*.sss;*.ttt;*.uuu;*.vvv;.w
ww;*.xxx;*.yyy;*.zzz

1to10000.txt  58894  2016-03-02 13:47
a b c.txt  0  2016-02-13 13:34
abc.foo  0  2016-03-20 13:55
abc1.txt  0  2016-03-17 23:14
anagram.exe  61952  2013-08-23 23:40
aslashb.txt  5  2015-11-25 23:26
colordir.txt  407  2015-12-03 21:20
files.txt  1469  2016-03-03 13:40
fmtest.txt  0  2016-02-06 23:12
fmtext.txt  148190  2016-02-07 14:26
foo.txt  1238  2016-04-20 13:52
history.txt  162262  2016-04-04 21:06
perffreq.exe  49664  2014-06-24 14:00
remember.txt  167  2015-06-12 16:04
savedcsb.txt  7753  2016-03-10 13:25
settimer.txt  220  2016-01-03  1:13
uhelpcd.txt  322  2015-12-23 15:23
  492,543 bytes in 17 files and 0 dirs
  8,562,143,232 bytes free
 
Jun 21, 2011
12
0
It took me awhile to build up to finding this error. I gradually started maintaining environment variables for different kinds of files; it has made life easier. I'm just sharing this part for pure fun. The order is approximately from least complex kind of file to most complex kind:


set FILEMASK_FILELIST=*.m3u;*.sfv
set FILEMASK_TEXT=*.txt;*.log;*.ini;*.cfg;*.lst;*.msg;*.mesg;*.m3u;*.nfo;*.srt;*.sub;*.idx;*.ans;*.asc;*.diz;*.faq
set FILEMASK_RICHTEXT=*.html;*.htm;*.doc;*.rtf;*.docx;*.mht;*.pdf;*.url
set FILEMASK_CODE=*.pl;*.py;*.java;*.bat;*.sql;*.asm;*.bas;*.c;*.h;*.java;*.pas;*.php;*.sql;*.vbs
set FILEMASK_APPLICATION=*.exe;*.apk;*.msi;*.com
set FILEMASK_ARCHIVE=*.zip;*.rar;*.tar;*.gz;*.7z;*.arj;*.jar;*.r00;*.r01;*.ace
set FILEMASK_DISC_IMAGE=*.iso;*.img
set FILEMASK_IMAGE=*.jpg;*.jpeg;*.gif;*.png;*.bmp;*.ico;*.tif;*.tiff;*.pcx;*.art;*.cbr;*.cbz
set FILEMASK_COMIC_BOOK=*.cbr;*.cbz
set FILEMASK_AUDIO=*.mp3;*.wav;*.rm;*.voc;*.au;*.mid;*.stm;*.mod;*.vqf;*.ogg;*.mpc;*.wma;*.mp4;*.flac;*.snd
set FILEMASK_VIDEO=*.mkv;*.avi;*.mp4;*.flv;*.mov;*.wmv;*.mpg;*.mpeg;*.vob;*.bdmv;*.ts;*.m2ts;*.rm;*.qt;*.asf;*.asx;*.fli;*.swf;*.m4v;*.webm
 
Jun 21, 2011
12
0
So.... What is the procedure for getting this fixed, anyway? Is my post here sufficient, or do I need to make an official bug report or something?
 
Apr 2, 2011
1,441
10
54
North Carolina, USA
It took me awhile to build up to finding this error. I gradually started maintaining environment variables for different kinds of files; it has made life easier. I'm just sharing this part for pure fun. The order is approximately from least complex kind of file to most complex kind:


set FILEMASK_FILELIST=*.m3u;*.sfv
set FILEMASK_TEXT=*.txt;*.log;*.ini;*.cfg;*.lst;*.msg;*.mesg;*.m3u;*.nfo;*.srt;*.sub;*.idx;*.ans;*.asc;*.diz;*.faq
set FILEMASK_RICHTEXT=*.html;*.htm;*.doc;*.rtf;*.docx;*.mht;*.pdf;*.url
set FILEMASK_CODE=*.pl;*.py;*.java;*.bat;*.sql;*.asm;*.bas;*.c;*.h;*.java;*.pas;*.php;*.sql;*.vbs
set FILEMASK_APPLICATION=*.exe;*.apk;*.msi;*.com
set FILEMASK_ARCHIVE=*.zip;*.rar;*.tar;*.gz;*.7z;*.arj;*.jar;*.r00;*.r01;*.ace
set FILEMASK_DISC_IMAGE=*.iso;*.img
set FILEMASK_IMAGE=*.jpg;*.jpeg;*.gif;*.png;*.bmp;*.ico;*.tif;*.tiff;*.pcx;*.art;*.cbr;*.cbz
set FILEMASK_COMIC_BOOK=*.cbr;*.cbz
set FILEMASK_AUDIO=*.mp3;*.wav;*.rm;*.voc;*.au;*.mid;*.stm;*.mod;*.vqf;*.ogg;*.mpc;*.wma;*.mp4;*.flac;*.snd
set FILEMASK_VIDEO=*.mkv;*.avi;*.mp4;*.flv;*.mov;*.wmv;*.mpg;*.mpeg;*.vob;*.bdmv;*.ts;*.m2ts;*.rm;*.qt;*.asf;*.asx;*.fli;*.swf;*.m4v;*.webm

Is this the full list of FILEMASK_*'s that you have?
 
Similar threads
Thread starter Title Forum Replies Date
R WAD Unusable state when using Chinese characters Support 3
C TEE command appending null characters to output Support 6
D Regexes and escape characters Support 5
vefatica Quoting file names with special characters? Support 7
vefatica How to? Add real <ESC> characters with TPIPE Support 2
C Erase all characters left or right from cursor location Support 2
J Escaped Characters and Variables Support 2
Joe Caverly Unicode, Codepage 437, and line characters Support 3
gschizas Fixed Using codepage 65001 (UTF-8) breaks non-ASCII characters Support 8
vefatica Display of special characters in aliases. Support 25
J Python: TCC command line parsing removes '=' equal sign characters Support 4
redwdc TCC.exe opens to 11 characters x 3 rows Support 1
G Selection characters with mouse double-click Support 3
R Function #IDOW returns only 2 characters Support 10
krischik WAD Tee printing Chinese characters Support 7
Alexander How to? how can I use Cyrillic characters in the Echo command? Support 8
jadaml Echo unicode characters from UTF-8 Batch files? Support 1
V Fixed CD ~ has trash characters in it Support 5
S International characters - TYPE vs %@LINE function Support 5
Jay Sage Getting Quote Characters into a Toolbar Tab Support 12
vefatica Fixed Escaping special characters Support 1
M Problem with Extended Search and non-ASCII characters in directories names Support 3
A How to? PhraseExpress autotext/autocompletion printing unexpected characters Support 4
thedave WAD Unable to type various characters using Windows 8's onscreen keyboard Support 7
JohnQSmith WAD DO and escaped redirect characters Support 6
W TCMD 16: double characters Support 11
MickeyF how to work with env var with special characters in the name Support 5
vefatica Fixed TPIPE doesn't /SPLIT at characters Support 0
A Escape characters on right side of pipe Support 0
J How to? 'tab' characters in the console and clipboard 'copy' Support 1
M How to? Determine a whether vars beginning with certain characters exist... Support 5
M Another simple question re. Take Command/TCC window witdth in characters... Support 16
U Keystack mangles 'special' characters Support 6
J dir failure with some unicode characters Support 6
vefatica Random access to the characters in a string? Support 4
nikbackm @select function and TAB characters Support 1
M Overriding meanings of some characters... Support 7
T How do you echo lines with special characters to file? Support 4
Emilio III Control characters pass through? Support 6
S Strange REN problem - non-English characters Support 3
nikbackm Output of non-ascii characters via pipe Support 1
K Processing strings with % characters? Support 2
W Bugs in dealing with Chinese characters? Support 0

Similar threads