Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2644 > unrolled thread

from cmd to Java

Started bykc0hwa@gmail.com
First post2013-04-04 17:42 -0700
Last post2013-04-04 22:44 -0700
Articles 14 — 7 participants

Back to article view | Back to comp.lang.java.help


Contents

  from cmd to Java kc0hwa@gmail.com - 2013-04-04 17:42 -0700
    Re: from cmd to Java Joerg Meier <joergmmeier@arcor.de> - 2013-04-05 02:47 +0200
      Re: from cmd to Java J Lee Hughes <kc0hwa@gmail.com> - 2013-04-04 19:47 -0700
    Re: from cmd to Java Lew <lewbloch@gmail.com> - 2013-04-04 18:13 -0700
    Re: from cmd to Java J Lee Hughes <kc0hwa@gmail.com> - 2013-04-04 19:31 -0700
    Re: from cmd to Java J Lee Hughes <kc0hwa@gmail.com> - 2013-04-04 19:42 -0700
      Re: from cmd to Java Lew <lewbloch@gmail.com> - 2013-04-04 22:30 -0700
        Re: from cmd to Java J Lee Hughes <kc0hwa@gmail.com> - 2013-04-05 03:39 -0700
          Re: from cmd to Java 1connu <1connu999@gmail.com> - 2013-04-05 13:16 +0200
            Re: from cmd to Java J Lee Hughes <kc0hwa@gmail.com> - 2013-04-05 04:27 -0700
          Re: from cmd to Java paul.cager@gmail.com - 2013-04-05 04:27 -0700
            Re: from cmd to Java J Lee Hughes <kc0hwa@gmail.com> - 2013-04-05 06:55 -0700
              Re: from cmd to Java Lew <lewbloch@gmail.com> - 2013-04-05 13:35 -0700
    Re: from cmd to Java Roedy Green <see_website@mindprod.com.invalid> - 2013-04-04 22:44 -0700

#2644 — from cmd to Java

Fromkc0hwa@gmail.com
Date2013-04-04 17:42 -0700
Subjectfrom cmd to Java
Message-ID<73c0a1b4-b8b2-4e10-9cfa-bc6118f5c633@googlegroups.com>
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

[toc] | [next] | [standalone]


#2645

FromJoerg Meier <joergmmeier@arcor.de>
Date2013-04-05 02:47 +0200
Message-ID<qtigulfhr49j$.p7qckazqucr7$.dlg@40tude.net>
In reply to#2644
On Thu, 4 Apr 2013 17:42:41 -0700 (PDT), kc0hwa@gmail.com wrote:

> 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

Start by going to www.google.com and type in "Java tutorial", then follow
the steps in the links. Or pay someone to do your work for you.

Liebe Gruesse,
		Joerg

-- 
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.

[toc] | [prev] | [next] | [standalone]


#2649

FromJ Lee Hughes <kc0hwa@gmail.com>
Date2013-04-04 19:47 -0700
Message-ID<0afece7d-581d-4b5f-b3ab-0c599c9e2616@googlegroups.com>
In reply to#2645
On Thursday, April 4, 2013 7:47:54 PM UTC-5, Joerg Meier wrote:
> On Thu, 4 Apr 2013 17:42:41 -0700 (PDT), kc0hwa@gmail.com wrote:
> 
> 
> 
> > 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
> 
> 
> 
> Start by going to www.google.com and type in "Java tutorial", then follow
> 
> the steps in the links. Or pay someone to do your work for you.
> 
> 
> 
> Liebe Gruesse,
> 
> 		Joerg
> 
> 
> 
> -- 
> 
> Ich lese meine Emails nicht, replies to Email bleiben also leider
> 
> ungelesen.

I did go to java tutal and did not get the answer
I do my own work

I can code in GO C C# Basic
I trying to get in to Java so it may be cross platfor
I use linux unix windows and mac x

C and basic is to match work to get the app for all

if I can you GO or GOS would be the best but most API will not work with it yet

[toc] | [prev] | [next] | [standalone]


#2646

FromLew <lewbloch@gmail.com>
Date2013-04-04 18:13 -0700
Message-ID<e705ac9f-75c0-4300-916b-b98d417b0598@googlegroups.com>
In reply to#2644
J Lee Hughes wrote:
> how to code this in java [sic] not script but compiling
> this is in cmd
> 
> set home=%~dp0

This would likely be a variable assignment in Java.

> set file_to_find=A_job-2-do_

You would use a 'String' to hold the filename, then build probably a 'java.io.File' 
over that.

> set when_done=B_Job-done

Looks like a boolean condition in a 'while' or 'for' type of construct in Java.

> for /f "delims=" %%A in ('dir /s/b/o:n/d:-a ^"%home%%file_to_find%^"') do (

Java 'for' loop.

>  for /f "delims=" %%z in ('call rename.cmd ^"%%~A^" ^"\%file_to_find%^" "\%when_done%"') do (

You would have to code up the rename. There's a method in 'java.io.File' that could help.

>      for /f "tokon=1,2 delims=" %%B in (%%~A) do (

Whatever this is supposed to do, you can do with a 'for' loop and parsing or splitting out 
stuff from a 'String'.

>         "7za.exe" a -t7z -m0=LZMA -mmt=on -mx9 -md=128m -mfb=273 -ms=e -sccUTF-8 -w"%%~dpA" "%%~B" "%%~A" 

If you already have an executable, would you recode it in Java or use it directly?

>      )
>  rename "%%~A" "%%~nx.z"
> )
> echo done

'System.out.println("done");'

> pause

Various 'sleep()' methods.

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#2647

FromJ Lee Hughes <kc0hwa@gmail.com>
Date2013-04-04 19:31 -0700
Message-ID<07fe89c4-4245-47b8-8324-774494bb8044@googlegroups.com>
In reply to#2644
how to code this in java not script but compiling 
this is in cmd 

::set var 
set home=%~dp0 
set file_to_find=A_job-2-do_ 
set when_done=B_Job-done 

::the dir  will go to the filesystem and get from were app is file is sup dirtory that meet A_job-2-do_*.txt
:: the A_job-2-do_*.txt con contank a "input file address","output file address"
:: the for will run tell the end of file
for /f "delims=" %%A in ('dir /s/b/o:n/d:-a ^"%home%%file_to_find%^"') do ( 
:: this for look call a script that will replace the file address from what in var file_to_find to var When_done :like substition
 for /f "delims=" %%z in ('call rename.cmd ^"%%~A^" ^"\%file_to_find%^" "\%when_done%"') do ( 
::this for loop that the line and put input in input %%B and output %%C for output
     for /f "tokon=1,2 delims=" %%B in (%%~A) do ( 
::this call the 7z app and conpress the input file to output file command line
        "7za.exe" a -t7z -m0=LZMA -mmt=on -mx9 -md=128m -mfb=273 -ms=e -sccUTF-8 -w"%%~dpA" "%%~B" "%%~A" 
     ) 
:: this rename when done with file to done
 rename "%%~A" "%%~nx.z" 
) 
:tell when done lets you know
echo done 
pause 


sorry I did not comment this

[toc] | [prev] | [next] | [standalone]


#2648

FromJ Lee Hughes <kc0hwa@gmail.com>
Date2013-04-04 19:42 -0700
Message-ID<c8940162-8994-401b-8706-4e11122f09d3@googlegroups.com>
In reply to#2644
I have that for filesystem I have to do 

var BaseOfWork as new filesystem; 

var FaInput as new filesytem;
var FaOutput as new filesytem;

var FileTypeA as string="A_job-2-do_";
var FileTypeB as string="B_Job-done_";

can not file how to get the base of app
can not file how to ask the filesystem for the location of file after the base of app time that match in the var FIleTypeA

I think a math.subtitution will work
but how to rename the file it all was done all ok

[toc] | [prev] | [next] | [standalone]


#2650

FromLew <lewbloch@gmail.com>
Date2013-04-04 22:30 -0700
Message-ID<d099218e-5c67-472a-8ca6-c36014e513f7@googlegroups.com>
In reply to#2648
J Lee Hughes wrote:
> I have that for filesystem I have to do 
> 
> var BaseOfWork as new filesystem; 
> var FaInput as new filesytem;
> var FaOutput as new filesytem;
> var FileTypeA as string="A_job-2-do_";
> var FileTypeB as string="B_Job-done_";
> 
> can not file how to get the base of app
> 
> can not file how to ask the filesystem for the location of file after the base of app time that match in the var FIleTypeA
> 
> I think a math.subtitution will work
> but how to rename the file it all was done all ok

None of that is Java. It looks like Javascript.

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#2652

FromJ Lee Hughes <kc0hwa@gmail.com>
Date2013-04-05 03:39 -0700
Message-ID<ae320fd4-4e35-4f19-84f5-892307d8d4f9@googlegroups.com>
In reply to#2650
> Lew
 
> None of that is Java. It looks like Javascript.
so is there form of java script that you compile!

[toc] | [prev] | [next] | [standalone]


#2653

From1connu <1connu999@gmail.com>
Date2013-04-05 13:16 +0200
Message-ID<kjmbqb$e4t$1@shakotay.alphanet.ch>
In reply to#2652
J Lee Hughes a écrit :
>> Lew
>  
>> None of that is Java. It looks like Javascript.
> so is there form of java script that you compile!
> 
There is some java (GWT from google) that compile into javascript !

[toc] | [prev] | [next] | [standalone]


#2654

FromJ Lee Hughes <kc0hwa@gmail.com>
Date2013-04-05 04:27 -0700
Message-ID<e6981d82-8af5-4bb7-8322-c15709ccd9fa@googlegroups.com>
In reply to#2653
IM going to compile a portable app or a java top application!

to what I know java script the ones like CMD do not work allwas 

[toc] | [prev] | [next] | [standalone]


#2655

Frompaul.cager@gmail.com
Date2013-04-05 04:27 -0700
Message-ID<302dff22-6d00-46a2-8fea-3463347edf69@googlegroups.com>
In reply to#2652
On Friday, 5 April 2013 11:39:44 UTC+1, J Lee Hughes  wrote:
> > Lew
> > None of that is Java. It looks like Javascript.
> so is there form of java script that you compile!

I'm not sure if I am interpreting your request correctly.

JavaScript and Java are totally different things (in spite of having similar names). If you are after something to do with JavaScript (maybe a JavaScript compiler?) then I think you are asking the wrong group.

If you are asking about Java then I'm not sure quite what you are after.

[toc] | [prev] | [next] | [standalone]


#2656

FromJ Lee Hughes <kc0hwa@gmail.com>
Date2013-04-05 06:55 -0700
Message-ID<974844b5-502c-4559-ad6a-da04fcc281d9@googlegroups.com>
In reply to#2655
On Friday, April 5, 2013 6:27:39 AM UTC-5, paul....@gmail.com wrote:
> On Friday, 5 April 2013 11:39:44 UTC+1, J Lee Hughes  wrote:
> 
> > > Lew
> 
> > > None of that is Java. It looks like Javascript.
> 
> > so is there form of java script that you compile!
> 
> 
> 
> I'm not sure if I am interpreting your request correctly.
> 
> 
> 
> JavaScript and Java are totally different things (in spite of having similar names). If you are after something to do with JavaScript (maybe a JavaScript compiler?) then I think you are asking the wrong group.
> 
> 
> 
> If you are asking about Java then I'm not sure quite what you are after.

I think I what java and not javascript  I need to interface with filesystem and pass file to other applications.

[toc] | [prev] | [next] | [standalone]


#2657

FromLew <lewbloch@gmail.com>
Date2013-04-05 13:35 -0700
Message-ID<fc4f2488-3407-482b-a374-42215e47ac90@googlegroups.com>
In reply to#2656
J Lee Hughes wrote:
> I think I what [sic] java [sic] and not javascript [sic]  I need to interface with filesystem and 
> pass file to other applications.

Then you need to follow Joerg Meier's advice upthread.

Most of what you want should be in basic Java plus the java.io package.

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#2651

FromRoedy Green <see_website@mindprod.com.invalid>
Date2013-04-04 22:44 -0700
Message-ID<b4psl816vbnbch5d4ll00qq5ivaa73lmg3@4ax.com>
In reply to#2644
On Thu, 4 Apr 2013 17:42:41 -0700 (PDT), kc0hwa@gmail.com wrote,
quoted or indirectly quoted someone who said :

>how to code this in java not script but compiling
>this is in cmd

I have composed a small library for doing this sort of thing.
see http://mindprod.com/products1.html#BATIK

The nice thing about it is you find out about mistakes at compile
time.

-- 
Roedy Green Canadian Mind Products http://mindprod.com
Motors make noise, and that tells you about the feelings and attitudes 
that went into it. Something was more important than sensory pleasure -- 
nobody would invent a chair or dish that smelled bad or that made horrible 
noises -- why were motors invented noisy? How could they possibly be 
considered complete or successful inventions with this glaring defect?
Unless, of course, the aggressive, hostile, assaultive sound actually served
to express some impulse of the owner. 
~ Philip Slater (born: 1927 age: 85)
The Wayward Gate: Science and the Supernatural

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.help


csiph-web