It seems that the if statement cannot identify files via the wild card (*) in the wine version of cmd, and it causes your bat file to fail.
Code:
$ wine cmd
CMD Version 1.4
Z:\media\multimed-2\test\test0>if exist *.txt echo yes it exists
Z:\media\multimed-2\test\test0>if exist hello.txt echo yes it exists
yes it exists
Z:\media\multimed-2\test\test0>dir *.txt
fixme:ntdll:server_ioctl_file Unsupported ioctl 24000 (device=2 access=1 func=0 method=0)
Volume in drive Z has no label.
Diskvolymens serienummer är 0000-0000
Directory of Z:\media\multimed-2\test\test0
2013-03-09 17:39 141 1-50.txt
2012-03-31 16:24 12 hello.txt
2013-02-10 20:03 516 result1.txt
5 files 10,415 bytes
0 directories 24,164,999,168 bytes free
Z:\media\multimed-2\test\test0>
If you are prepared to use some other command and rewrite the bat file, it might help to know that dir can identify files via the wild card (*)
Bookmarks