Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

filemasks over 172 characters fail

Jun
19
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.
 
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
 
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
 
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?
 
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

Back
Top