java -cp ../../zbnfjax/zbnf.jar org.vishia.zcmd.JZcmd testFiles.jz.cmd
pause
exit /B

==JZcmd==

currdir = &scriptdir;  ##The directory of this script should use as current dir for the file examples.

main()
{
  //call testRenameMove();
  call testCopyWithMask();
}





sub testRenameMove() {
  //It moves a directory tree on the same device. It means only the source root directory file is changed on the device.
  //it is a cheap operation really, but it seams to be meanfull.
  move ../../srcJava_Zbnf srcJava_Zbnf_Moved;
  <+out>...ZBNF/srcJava_Zbnf is moved, look for it on disk. Press Enter key to continue. <.n+>
  String inp = jzcmd.getstdin();
  
  //It copies that sources back to the original place:
  ##copydir srcJava_Zbnf_Moved ../../srcJava_Zbnf;
  move srcJava_Zbnf_Moved ../../srcJava_Zbnf;
  <+out>...ZBNF/srcJava_Zbnf is copied back, look for it on disk. Press Enter key to continue. <.n+>
  String inp = jzcmd.getstdin();
  <+out>finished<.+n>
  
}


sub testCopyWithMask() {
  //It moves a directory tree on the same device. It means only the source root directory file is changed on the device.
  //it is a cheap operation really, but it seams to be meanfull.
  String srcMask = "**/File*.java";
  copy ../../srcJava_Zbnf/**/Zbnf*.java tmp/srcJava_Zbnf_copy;
  <+out>...srcJava_Zbnf/<&srcMask> is copied to tmp/srcJava_Zbnf_copy, look for it on disk. Press Enter key to continue. <.n+>
  String inp = jzcmd.getstdin();
  
  //It delete that files again:
  <+out>tmp/srcJava_Zbnf is deleted again, look for it on disk. Press Enter key to continue. <.n+>
  String inp = jzcmd.getstdin();
  <+out>finished<.+n>
  
}