X-Received: by 10.224.58.77 with SMTP id f13mr4348968qah.7.1365122561583; Thu, 04 Apr 2013 17:42:41 -0700 (PDT) X-Received: by 10.49.75.66 with SMTP id a2mr855042qew.21.1365122561529; Thu, 04 Apr 2013 17:42:41 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!ca1no29807794qab.0!news-out.google.com!ef9ni1849qab.0!nntp.google.com!ca1no29807791qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.help Date: Thu, 4 Apr 2013 17:42:41 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=205.221.67.200; posting-account=0TCwSgoAAABtD0piIbQ8OdSrd2BepsqH NNTP-Posting-Host: 205.221.67.200 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <73c0a1b4-b8b2-4e10-9cfa-bc6118f5c633@googlegroups.com> Subject: from cmd to Java From: kc0hwa@gmail.com Injection-Date: Fri, 05 Apr 2013 00:42:41 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.java.help:2644 how to code this in java not script but compiling this is in cmd set home=%~dp0 set file_to_find=A_job-2-do_ set when_done=B_Job-done for /f "delims=" %%A in ('dir /s/b/o:n/d:-a ^"%home%%file_to_find%^"') do ( for /f "delims=" %%z in ('call rename.cmd ^"%%~A^" ^"\%file_to_find%^" "\%when_done%"') do ( for /f "tokon=1,2 delims=" %%B in (%%~A) do ( "7za.exe" a -t7z -m0=LZMA -mmt=on -mx9 -md=128m -mfb=273 -ms=e -sccUTF-8 -w"%%~dpA" "%%~B" "%%~A" ) rename "%%~A" "%%~nx.z" ) echo done pause