473,385 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

About batch file!!!

539 512MB
Can a batch file executes the .COM file?
Can i invoke it with java?

I really have no experience on batch file....

can you give me some patterns or hint code?
or if you can't, just the best URL you have known?!!!

Any reply will be greatly appreciated,
Sukatoa
Feb 29 '08 #1
29 2522
AmberJain
884 Expert 512MB
Can a batch file executes the .COM file?
Can i invoke it with java?

I really have no experience on batch file....

can you give me some patterns or hint code?
or if you can't, just the best URL you have known?!!!

Any reply will be greatly appreciated,
Sukatoa
__________________________________________________ _______________
Yes, a batch file can execute a .com file.

A simple batch file executing command.com is give below------>
************************************************** *****************************************
cd\
cd windows
cd system32
command.com
exit

************************************************** *****************************************
I don't know JAVA and therefore am unaware whether a batch file can be executed from it. Better option is posting JAVA portion (part of this problem relating to java) of this problem into JAVA forum. You will get better answer there.

If you don't know to create a batch file, do tell me. I will then post a reply with a detailed description of creating a batch file.
If you face any other problems, do tell me.
__________________________________________________ _______________
HOPE THIS HELPS.........
Mar 1 '08 #2
sukatoa
539 512MB
__________________________________________________ _______________
Yes, a batch file can execute a .com file.

A simple batch file executing command.com is give below------>
************************************************** *****************************************
cd\
cd windows
cd system32
command.com
exit

************************************************** *****************************************
I don't know JAVA and therefore am unaware whether a batch file can be executed from it. Better option is posting JAVA portion (part of this problem relating to java) of this problem into JAVA forum. You will get better answer there.

If you don't know to create a batch file, do tell me. I will then post a reply with a detailed description of creating a batch file.
If you face any other problems, do tell me.
__________________________________________________ _______________
HOPE THIS HELPS.........
I already post that problem in the java forum and no one replies me there. Maybe they hate me... here is the link...

I know how to invoke Command prompt in java

Here is what i've been stucked...

I have a subject Assembly language, i feel hustle when i compile my a86 code in the CMD...

So i've made an editor made in java that would compile and run the generated .COM file...

If my a86 code named TEMP.ASM will be compiled, the A86 compiler will then generate the TEMP.COM (the program like .exe)...

at compiling, no problem
at executing TEMP.COM file, here is the problem...

I am satisfied when invoking .COM file from java...
but, the flow of the program change...

as the TEMP.COM invoked, executed, i expect that the program would wait until any character is pressed and then print that character and wait again for any character then terminated...

when i invoke that TEMP.COM in java, it waits for a character, but when i entered a character, it doesn't print...

Here is the java code for invoking .COM file,

Expand|Select|Wrap|Line Numbers
  1. Runtime.getRuntime.exec("cmd /C start TEMP.COM");
But when i double clicked the .COM file, im satisfied with the flow...

I i hope that in this forum will then help me with this kind of problem,

And thank you bro...



Here is my kind question for you,
Base on your code posted above,

It is like you are using CMD and looking for that file by googling the folders, am i right?

When i double clicked that batch file, is it automatically execute my TEMP.COM file?

If yes, then this is the answer ive been waiting for...
Mar 2 '08 #3
AmberJain
884 Expert 512MB
Here is my kind question for you,
Base on your code posted above,

It is like you are using CMD and looking for that file by googling the folders, am i right?

When i double clicked that batch file, is it automatically execute my TEMP.COM file?

If yes, then this is the answer ive been waiting for...
__________________________________________________ _______________
Yes, you guessed absolutely right.
In my code above, I'm just GOOGLING (a better word is browsing) the folders (as you guessed).
Then when I'm in the directory (or folder) of my choice i.e. the folder that contains TEMP.COM, I simply execute the file temp.com

THAT'S IT........(isn't that simple and powerful)

So you can simply modify the code very easily to do your job.
__________________________________________________ _______________
If you still face any problem, do tell me. I will help you out.
__________________________________________________ _______________
HOPE THIS HELPS.......................
Mar 2 '08 #4
sukatoa
539 512MB
__________________________________________________ _______________
Yes, you guessed absolutely right.
In my code above, I'm just GOOGLING (a better word is browsing) the folders (as you guessed).
Then when I'm in the directory (or folder) of my choice i.e. the folder that contains TEMP.COM, I simply execute the file temp.com

THAT'S IT........(isn't that simple and powerful)

So you can simply modify the code very easily to do your job.
__________________________________________________ _______________
If you still face any problem, do tell me. I will help you out.
__________________________________________________ _______________
HOPE THIS HELPS.......................

You got the best idea...

Thank you bro, I will ask you soon about batch file if i have another problem..

Thanks again..
Mar 3 '08 #5
sukatoa
539 512MB
I like to implement the behavior of the batch file being executed...

Suppose the batch file executes the .COM file...

That .COM file is the A86 Compiler generated file...

If after the .COM file execution, ( I will terminate )

How can i terminate the batch file that was invoked from java?

I mean, if the batch file invoked, the .COM file executes because the batch file invokes the .COM file...

If i will end the .COM file process (terminate the program), the DOS Prompt still executing...

How can i terminate that also?
Mar 7 '08 #6
sukatoa
539 512MB
The program now is under test process...

They suggest that it would be nice if i will terminate the DOS Prompt being executed by the batch file after the (Program) .COM file terminated...
(automatically terminates the DOS after terminating program..)


Because, it takes a little bit of time if they were to close the DOS Prompt by clicking the x(close) or typing the "exit" command..

Is it possible? bro?



I already posted my thread about this in Java forum, as of now, no replies...

Hoping for possibilities
Sukatoa..
Mar 7 '08 #7
AmberJain
884 Expert 512MB
The program now is under test process...

They suggest that it would be nice if i will terminate the DOS Prompt being executed by the batch file after the (Program) .COM file terminated...
(automatically terminates the DOS after terminating program..)


Because, it takes a little bit of time if they were to close the DOS Prompt by clicking the x(close) or typing the "exit" command..

Is it possible? bro?



I already posted my thread about this in Java forum, as of now, no replies...

Hoping for possibilities
Sukatoa..
__________________________________________________ _______________
As in the sample batch file in my reply #2 above, if you want to exit the batch file, simply add the statement "exit" and then [enter] or [return]at the end of the batch file. For example, suppose the following batch file------->
++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
cd\
c:
cd windows
cd system32
dir
exit

++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
Note the command "exit" at the end of the above batch file which exits a batch file.

This is what I could think is your problem. If this is not your problem or this does not solves your problem, do tell me. I will try my best to help you out.
__________________________________________________ _______________
HOPE THIS HELPS............
Mar 8 '08 #8
sukatoa
539 512MB
__________________________________________________ _______________
As in the sample batch file in my reply #2 above, if you want to exit the batch file, simply add the statement "exit" and then [enter] or [return]at the end of the batch file. For example, suppose the following batch file------->
++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
cd\
c:
cd windows
cd system32
dir
exit

++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
Note the command "exit" at the end of the above batch file which exits a batch file.

This is what I could think is your problem. If this is not your problem or this does not solves your problem, do tell me. I will try my best to help you out.
__________________________________________________ _______________
HOPE THIS HELPS............
Yah, i added the exit, but it doesn't do the termination....

Here is the scenario,
After invoking linker.bat, the .COM file executes...

When i terminate the .COM file, it goes back to the cmd.exe...
Not in batch file....

I have a new idea....
Is there a technique using batch file that would terminate the MSDOS prompt(Still running state)....?

Update me...
Mar 11 '08 #9
AmberJain
884 Expert 512MB
Yah, i added the exit, but it doesn't do the termination....

Here is the scenario,
After invoking linker.bat, the .COM file executes...

When i terminate the .COM file, it goes back to the cmd.exe...
Not in batch file....

I have a new idea....
Is there a technique using batch file that would terminate the MSDOS prompt(Still running state)....?

Update me...
Last time when I replied, I couldnot understand your problem completely. Hope this time I am rightly interpreting your problem.
Yes, there's a way to do as you suggested (YOUR IDEA) in your reply.

Check out this. It might help.

Suppose your batch file is as follows ------------>
__________________________________________________ _______________
cd\
d:
cd documents and settings
cd user
cd my documents
cd files
scrsvr.com
pause
exit

__________________________________________________ _______________

Note first of all I browse to directory

d:\documents and settings\user\My documents\files

and execute the file scrsvr.com.
When I am completed with scrsvr.com, I exit scrsvr.com and find that batch file is waiting for me with message "Press any key to continue....." displayed on command prompt. When I press any key on keyboard, the next command "exit" in my batch file executes and I exit the command prompt.

I mean to say that command "pause" in a batch file waits for any key to be pressed by the user and then only it proceeds with the execution of batch file. You can also include "pause" command multiple times in your batch file (as many times as you wish) at multiple places. Furthermore this do mean that you can also include any command after "pause" command.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~
If you still face any problem, do tell me. I will help you out.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~
HOPE THIS HELPS................
Mar 11 '08 #10
sukatoa
539 512MB
Last time when I replied, I couldnot understand your problem completely. Hope this time I am rightly interpreting your problem.
Yes, there's a way to do as you suggested (YOUR IDEA) in your reply.

Check out this. It might help.

Suppose your batch file is as follows ------------>
__________________________________________________ _______________
cd\
d:
cd documents and settings
cd user
cd my documents
cd files
scrsvr.com
pause
exit

__________________________________________________ _______________

Note first of all I browse to directory

d:\documents and settings\user\My documents\files

and execute the file scrsvr.com.
When I am completed with scrsvr.com, I exit scrsvr.com and find that batch file is waiting for me with message "Press any key to continue....." displayed on command prompt. When I press any key on keyboard, the next command "exit" in my batch file executes and I exit the command prompt.

I mean to say that command "pause" in a batch file waits for any key to be pressed by the user and then only it proceeds with the execution of batch file. You can also include "pause" command multiple times in your batch file (as many times as you wish) at multiple places. Furthermore this do mean that you can also include any command after "pause" command.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~
If you still face any problem, do tell me. I will help you out.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~
HOPE THIS HELPS................
Roger...

I got it....

Thank you bro..

I am facing a new problem again...

About my .COM file............

As my a86 code getting bigger, making a "simple calculator"...

The batch file now cannot invoke properly the .COM file...

Can i have your email address? i would like this .COM file to be test in you...

Maybe you can invoke it properly...

Thanks again...
Mar 11 '08 #11
AmberJain
884 Expert 512MB
Roger...

I got it....

Thank you bro..

I am facing a new problem again...

About my .COM file............

As my a86 code getting bigger, making a "simple calculator"...

The batch file now cannot invoke properly the .COM file...

Can i have your email address? i would like this .COM file to be test in you...

Maybe you can invoke it properly...

Thanks again...
You can upload the file on the RAPIDSHARE (www.rapidshare.com/), MEGAUPLOAD (with a free account available on these sites) or any other uploading site and then post the address of the page which hosts that file in this thread. I will then download that file and then help you out.

Alternatively, if you need my e-mail address, here it is----->
newlearner.ambr@gmail.com

REMEMBER to notify me in this thread when you have mailed me the .com file.
As I don't check out mails for this account too often. When you would have sent the mail, I would check it out exclusively.
Don't spam me please....
__________________________________________________ _______________
(As always) Hope this helps...........
Mar 11 '08 #12
sukatoa
539 512MB
You can upload the file on the RAPIDSHARE (www.rapidshare.com/), MEGAUPLOAD (with a free account available on these sites) or any other uploading site and then post the address of the page which hosts that file in this thread. I will then download that file and then help you out.

Alternatively, if you need my e-mail address, here it is----->
newlearner.ambr@gmail.com

REMEMBER to notify me in this thread when you have mailed me the .com file.
As I don't check out mails for this account too often. When you would have sent the mail, I would check it out exclusively.
Don't spam me please....
__________________________________________________ _______________
(As always) Hope this helps...........
Don't worry, im not a spammer, i am a programmer.... ;-)

You are a good guy, why should i spam you?....

I have sent the .COM file....

My batch file looks like this,

FINAL2.COM

That was only the content of the batch file....

I put it beside the FINAL2.COM

So, when i clicked that batch file, nothing wrong....

But when my program, made in java invokes that batch file, it does nothing on the flow...

It was just a black black screen, the cursor sets at 0,0 (x,y)

Whatever i click, no response...

Until, the system prompts me to close the program....


Update me....
Mar 12 '08 #13
AmberJain
884 Expert 512MB
Don't worry, im not a spammer, i am a programmer.... ;-)

You are a good guy, why should i spam you?....

I have sent the .COM file....

My batch file looks like this,

FINAL2.COM

That was only the content of the batch file....

I put it beside the FINAL2.COM

So, when i clicked that batch file, nothing wrong....

But when my program, made in java invokes that batch file, it does nothing on the flow...

It was just a black black screen, the cursor sets at 0,0 (x,y)

Whatever i click, no response...

Until, the system prompts me to close the program....


Update me....
SORRY FOR THE INCONVENIENCE..........................
Something went wrong probably. Actually when I checked the inbox of newlearner.ambr@gmail.com, I couldnot find your mail. That means it's not delievered to me. So I did what I can.
I mailed my another mail ID (mail account on yahoo) to your ID which is mentioned below :
ghize_adt@yahoo.com

I found this ID on your profile page at :
YOUR PROFILE

Check out my offline mail at yahoo login page at:
http://www.mail.yahoo.com/

I hope I mailed my yahoo mail ID to your valid mail ID. Now as you receive that mail, check out my ID in it and mail me the .com file on that ID (Again sorry for the inconvenience). I know you might be cursing me right now, but what can I do if I cannot receive your mail on gmail ID. Actually I am quite used to yahoo mail than to gmail. So mail me .com file at yahoo ID.

REMEMBER to notify me in this thread when you have mailed me the .com file to my yahoo ID.
__________________________________________________ _______________
WAITING FOR YOUR REPLY..........
Mar 12 '08 #14
sukatoa
539 512MB
SORRY FOR THE INCONVENIENCE..........................
Something went wrong probably. Actually when I checked the inbox of newlearner.ambr@gmail.com, I couldnot find your mail. That means it's not delievered to me. So I did what I can.
I mailed my another mail ID (mail account on yahoo) to your ID which is mentioned below :
ghize_adt@yahoo.com

I found this ID on your profile page at :
YOUR PROFILE

Check out my offline mail at yahoo login page at:
http://www.mail.yahoo.com/

I hope I mailed my yahoo mail ID to your valid mail ID. Now as you receive that mail, check out my ID in it and mail me the .com file on that ID (Again sorry for the inconvenience). I know you might be cursing me right now, but what can I do if I cannot receive your mail on gmail ID. Actually I am quite used to yahoo mail than to gmail. So mail me .com file at yahoo ID.

REMEMBER to notify me in this thread when you have mailed me the .com file to my yahoo ID.
__________________________________________________ _______________
WAITING FOR YOUR REPLY..........
No, cursing?!! hahahhh no.... ;-)

It is just a normal thing... Nobody is perfect right....?
I will try again...
Mar 12 '08 #15
sukatoa
539 512MB
I didn't receive your YM ID also....

Im now disturbing you bro.... ;-)

Maybe we could have file transfer at "sukatoa" yahoo group....

Here is the link: sukatoa

I've been uploaded the .COM file there....

Thanks for the help bro...
Mar 12 '08 #16
AmberJain
884 Expert 512MB
I didn't receive your YM ID also....

Im now disturbing you bro.... ;-)

Maybe we could have file transfer at "sukatoa" yahoo group....

Here is the link: sukatoa

I've been uploaded the .COM file there....

Thanks for the help bro...
__________________________________________________ _______________
OK, I downloaded the final6.com from the "sukatoa" yahoo group.
Now I will try to write a batch file for it. When I'm done with batch file, I will post it here.

GOODBYE till then : )
__________________________________________________ _______________
Mar 13 '08 #17
AmberJain
884 Expert 512MB
Don't worry, im not a spammer, i am a programmer.... ;-)

You are a good guy, why should i spam you?....

I have sent the .COM file....

My batch file looks like this,

FINAL2.COM

That was only the content of the batch file....

I put it beside the FINAL2.COM

So, when i clicked that batch file, nothing wrong....

But when my program, made in java invokes that batch file, it does nothing on the flow...

It was just a black black screen, the cursor sets at 0,0 (x,y)

Whatever i click, no response...

Until, the system prompts me to close the program....


Update me....
As I said in my last reply, I downloaded final6.com file.
First of all I suppose that your .com file (CALCULATOR PROGRAM) is still under construction as I'm not getting correct outputs when I tested.

Now let's come to the point. I'm able to run your FINAL6.com file very easily from a batch file.

First of all I put the file final6.com in an empty directory or folder (i.e.d:\DIREC). Now I created a batch file (test.bat) and saved it in the same folder as final6.com.
*****************************
CONTENTS OF test.bat
_____________________
final6.com
_____________________
Now that's whatis my batch file. It simply calls final6.com and nothing else.

When I double click that batch file, final6.com runs successfully. When I exit from final6.com, I exit the dos prompt automatically.

I even tried this with a batch file (another.bat) in same folder as final6.com.
*********************************
CONTENTS OF another.bat
________________________
cd\
d:
cd DIREC
echo executing final6.com....
pause
final6.com
pause
exit

_________________________
When I execute this batch file, I first browse to directory d:\DIREC and then echo a message "executing final6.com...." is displayed on the screen. Then I'm prompted "press a key to continue....." due to pause command in batch file.
When I press any key, final6.com is executed and it works nicely (except that outputs are incorrect). When I exit final6.com I'm again prompted to press any key and then when I press any key, I exit the batch file as well as command prompt.


So this means NOTHING IS HAPPENING as you said------>
"But when my program, made in java invokes that batch file, it does nothing on the flow...It was just a black black screen, the cursor sets at 0,0 (x,y).Whatever i click, no response...Until, the system prompts me to close the program...."
So, the moral of above story is that everything is working fine (atleast on my PC) when I call final6.com from batch file of different kinds. Hope I correctly interpreted your problem. If this is not what you are facing, do tell me.

If you still face problem or I'm misinterpreting you then tell me.
__________________________________________________ _______________
HOPE THIS HELPS.............
Mar 13 '08 #18
sukatoa
539 512MB
Ok, i got it.... ;-)

Same here as you've tested...

Thanks for testing.... ;-)

I realize that, there is no problem in the batch file...

Your explanation is correct...


The problem is in my java program...

Expand|Select|Wrap|Line Numbers
  1. Runtime.getRuntime().exec("cmd /C start batch.bat");
The code above will invoke the cmd.exe and that cmd will invoke that batch file....

The new problem now, is how do i terminate that cmd.exe while it is still running?

Can i call a batch file that would terminate that cmd.exe?(MS DOS)?

Thank you very much bro... ;-)
Mar 14 '08 #19
AmberJain
884 Expert 512MB
The new problem now, is how do i terminate that cmd.exe while it is still running?

Can i call a batch file that would terminate that cmd.exe?(MS DOS)?

Thank you very much bro... ;-)
HELLO,

SORRY for such a long interval between my last and this reply. After a long long time (probably 5 days), I'm back on on internet (+TSDN). Actually the cable for my broadband connection broke and it took service provider's techies 4 days to repair it(A LONG TIME INDEED).

Now let me tell you that this time I'm unable to understand what you meant to ask. Can you PLZ give a bit more detailed descripton of your problem. Then I will help you if I can.

One more thing, can you please tell me whether it is possible to write a JAVA program which shuts down one's PC. I mean to say that if I double click on that program, my PC gets shutdown.
__________________________________________________ _______________
Mar 18 '08 #20
sukatoa
539 512MB
HELLO,

SORRY for such a long interval between my last and this reply. After a long long time (probably 5 days), I'm back on on internet (+TSDN). Actually the cable for my broadband connection broke and it took service provider's techies 4 days to repair it(A LONG TIME INDEED).

Now let me tell you that this time I'm unable to understand what you meant to ask. Can you PLZ give a bit more detailed descripton of your problem. Then I will help you if I can.

One more thing, can you please tell me whether it is possible to write a JAVA program which shuts down one's PC. I mean to say that if I double click on that program, my PC gets shutdown.
__________________________________________________ _______________
Yes, you can write it in java.... Java can invoke it....
It could process logoff, and restart....

How would you shutdown your pc using batch file?!!

That pattern will be used in Runtime.getRuntime().exec("your pattern here");

One way is like this in java

Expand|Select|Wrap|Line Numbers
  1. Runtime.getRuntime().exec("shutdown -r -t 00");
it shuts down the PC... that was for Windows...
I don't know the pattern in Linux/Mac/Solaris....

Thanks for the reply bro...
I have a problem in java (File transfer)....
I've got a low quality of file transfering....

Im currently doing it now....
And im hoping to implement it in a right way.... ;-)

I will post here again if the problem persists....

Sukatoa...
Mar 18 '08 #21
AmberJain
884 Expert 512MB
So HOPE that you are not facing any problems now.......

Well, remember my advice though that learning a bit of DOS and BATCH FILE PROGRAMMING would be of great use to you. If you need I can also mail you an ebook for BATCH FILES.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ambrnewlearner
Mar 20 '08 #22
sukatoa
539 512MB
So HOPE that you are not facing any problems now.......

Well, remember my advice though that learning a bit of DOS and BATCH FILE PROGRAMMING would be of great use to you. If you need I can also mail you an ebook for BATCH FILES.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ambrnewlearner
Yah, you're right bro...

I will...

Can you share your ebook about BATCH FILES?

If you have time, maybe at the group where you get the .COM file... Send it there...

I am also planning to use autorun soon... After this project...

can you discuss a little bit about autorun bro?

Michael, "sukatoa"
Mar 20 '08 #23
AmberJain
884 Expert 512MB
Yah, you're right bro...

I will...

Can you share your ebook about BATCH FILES?

If you have time, maybe at the group where you get the .COM file... Send it there...

I am also planning to use autorun soon... After this project...

can you discuss a little bit about autorun bro?

Michael, "sukatoa"
HELLO AGAIN,
I have sent the BATCH FILE ebook on sukatoa yahoo group. Check it out.

And yes, it would be really fine if we discuss something (I'd better say many things) on AUTORUN. I know many things about it and certainly expect to learn more about it by discussing about it on TheScripts. But I think if we create a separate thread for it, it would be certainly better. So plz create a separate thread for it and provide it's link in this thread. Then we will have (PROBABLY a very lively) discussion about it on TSDN.

GOOD BYE TILL THEN...........
Mar 21 '08 #24
AmberJain
884 Expert 512MB
HELLO,
As I said, I have started a new thread on AUTORUN. The link to it is below---->

LINK

Please visit the thread and let's start discussing it.

GOODBYE....
Mar 22 '08 #25
sukatoa
539 512MB
HELLO,
As I said, I have started a new thread on AUTORUN. The link to it is below---->

LINK

Please visit the thread and let's start discussing it.

GOODBYE....
Yah, i will post my questions there soon....

About batch file again... ;-)

Expand|Select|Wrap|Line Numbers
  1. D:
  2. cd Documents and Settings
  3. cd All User
  4. cd Desktop
  5. FINAL40.COM
That pattern was generated from my program... after compiling...
That was successful...

But, when i save the codes at different directories,
The pattern above will change according to the specified directory where the .asm file saved...

for example,

Expand|Select|Wrap|Line Numbers
  1. E:
  2. cd Java
  3. cd Under Development
  4. cd ASM IDE
  5. FINAL40.COM
The pattern above is incorrect according to the CMD....

It says "the system cannot find the path specified"

What's wrong with my generator?
Is my pattern above correct? or incorrect?

Will i change the whitespace into %20 instead?

sukatoa...
Mar 22 '08 #26
AmberJain
884 Expert 512MB
Yah, i will post my questions there soon....

About batch file again... ;-)

Expand|Select|Wrap|Line Numbers
  1. D:
  2. cd Documents and Settings
  3. cd All User
  4. cd Desktop
  5. FINAL40.COM
That pattern was generated from my program... after compiling...
That was successful...

But, when i save the codes at different directories,
The pattern above will change according to the specified directory where the .asm file saved...

for example,

Expand|Select|Wrap|Line Numbers
  1. E:
  2. cd Java
  3. cd Under Development
  4. cd ASM IDE
  5. FINAL40.COM
The pattern above is incorrect according to the CMD....

It says "the system cannot find the path specified"

What's wrong with my generator?
Is my pattern above correct? or incorrect?

Will i change the whitespace into %20 instead?

sukatoa...
First of all you ought to check whether the directories and drive (E:,java,Under development,ASM IDE as in your reply) exist on your HDD i.e. there's a path as following existing on your PC ------>
e:\Java\Under development\ASM IDE\Final40.com

Now if it exist, then run the following batch file
__________________________________________________ _______________
E:
pause
cd Java
pause
cd Under Development
pause
cd ASM IDE
pause
FINAL40.COM
pause
exit
__________________________________________________ _______________
Now check for this while you execute that batch file---->
At which PAUSE command does the batch file produces an error message as the "the system cannot find the path specified".

Report me that pause command at which this occurs so that I can further analyse this problem.
Mar 23 '08 #27
sukatoa
539 512MB
First of all you ought to check whether the directories and drive (E:,java,Under development,ASM IDE as in your reply) exist on your HDD i.e. there's a path as following existing on your PC ------>
e:\Java\Under development\ASM IDE\Final40.com

Now if it exist, then run the following batch file
__________________________________________________ _______________
E:
pause
cd Java
pause
cd Under Development
pause
cd ASM IDE
pause
FINAL40.COM
pause
exit
__________________________________________________ _______________
Now check for this while you execute that batch file---->
At which PAUSE command does the batch file produces an error message as the "the system cannot find the path specified".

Report me that pause command at which this occurs so that I can further analyse this problem.
Sorry, i now realize that there is something fishy in my implementation...

batch file generator i mean...

Problem resolved....

Thanks bro...
Mar 23 '08 #28
AmberJain
884 Expert 512MB
Sorry, i now realize that there is something fishy in my implementation...

batch file generator i mean...

Problem resolved....

Thanks bro...
Hello,
I always like to explore new programs and software. And therefore can you please tell me the name of BATCH FILE GENERATOR you are using? I don't know if there's existing one around. If you tell me it's download link it would be really nice.

THANKS IN ADVANCE................
__________________________________________________ _______________
Mar 25 '08 #29
sukatoa
539 512MB
Hello,
I always like to explore new programs and software. And therefore can you please tell me the name of BATCH FILE GENERATOR you are using? I don't know if there's existing one around. If you tell me it's download link it would be really nice.

THANKS IN ADVANCE................
__________________________________________________ _______________
That batch file generator i mean is the java class i made to generate a batch file that receives a parameter ( Absolute file directory ) and extract its contents and then create a batch file... I not sure if this has no bugs... i only implemented it for my program....

If you like, tell me, i will send it to YGroups.. But, you will need to download jre 1.6.03 or later.... and install it for the program to run....

sukatoa...
Mar 26 '08 #30

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: DBA | last post by:
I have a windows batch file that executes a SQL Server bcp command. I would like to obtain a return code if the bcp command fails. However, I cannot seem to find the return code (if any) for bcp....
0
by: SkySea | last post by:
Hi! Any help on this would be appreciated... In an HTML document that lists instructions on installing some software, there's a point where a DOS batch file needs to be run in order to copy...
14
by: Mark C. | last post by:
I'm trying to call a batch file that I've built using the FileSystemObject and CreateObject("Wscript.Shell"), oShell.Run... in an asp script. Naturally, I can get the script to work from a command...
4
by: Bill | last post by:
I need help closing a CMD window when it is executed from Access. 1) The batch file is called from Access. 2) Access closes, 3) the batch runs a copy of the access database (creating a backup)...
3
by: emman_54 | last post by:
Hi every one, I am trying to run a batch file using my asp.net application. I am using the Process class to run the batch file. When I run my web application, In the task manager, i could see...
1
by: steve | last post by:
Hi all, Here's some work in progress that should allow you to run a batch file as a custom action in a VS deployment project. Yup I know you can use js or wsh, but the target may not have...
14
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in...
0
by: =?Utf-8?B?UnVzdHlfUm9zZXI=?= | last post by:
Hi everyone, I'm having some issues figuring out how to complete certain tasks with a batch file, whether it be not knowing the right syntax or if it can even be accomplished with a batch file....
0
by: PradeepChabukswar | last post by:
How to find Total Number of Partition and their name on windows system through Batch file? Is there any Language for this? Also how can we Program to make some filehadling?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.