View Full Version : batch job
24giovanni
07-11-2006, 05:39 PM
I am trying to create a batch job on xp pro but I can't get the extension to work (.bat) as an example. Is it possible to run batch jobs on XP Pro? If so, what do I need to do to get it to work please?
TIA
azzey
07-11-2006, 06:36 PM
Will this do the job?
http://www.camelliasoftware.com/systemrequirements.htm
24giovanni
07-11-2006, 06:50 PM
no, that's not what I am trying to do...tks though.
jlreich
07-11-2006, 07:19 PM
You can run a batch job in all versions of windows. What is it you are trying to do? I have not messed around with batch files very much but I am sure someone around here can offer some advice on whatever it is you want to do.
Edit - Just a thought, but it may have to do with where you are trying to run the file from. You may have to add the path to the system variables if you are not running it from the directory the command prompt is currently in.
24giovanni
07-11-2006, 07:45 PM
how do I run it in DOS? Can you give me some examples. I would really appreciate it.
jlreich
07-11-2006, 08:08 PM
Like I said I haven't messed around with them very much. But I know there are several other members that know quite a bit about batch files. Perhaps one of them will pop in to offer some advice.
jlreich
07-11-2006, 08:38 PM
Here is an excellent tutorial on batch files. http://www.computerhope.com/batch.htm
Hope that helps. :)
Paul Komski
07-11-2006, 08:38 PM
Strictly speaking there is no DOS in WinXP but as long as the lines of code would run at the WinXP Command Prompt you should be able to exectute them (and other stuff) in that OS.
Loads of tutorials on the web http://www.google.ie/search?hl=en&q=batch+file+tutorials&btnG=Google+Search&meta=
What specifically do you want to do and we can give specific advice.
FrankSG
07-11-2006, 09:13 PM
how do I run it in DOS? Can you give me some examples. I would really appreciate it.
I may not be entirely correct in what I'm going to say, but I think the only way you can run a batch file is to first bring up the command prompt and run it there. The file would have a name such as xxx.bat. It has to have a bat extension, but you can name it any thing you want. If, as an example, you maned it Charlie.bat, type in the commands you wanted it to carry out, and then typed in Charlie, it would then carry out the commands that you typed in. In other words if you wanted to create a batch file to copy all the files from a folder named data files in your C: drive to a floppy in A:, you could open up notepad and type in copy c:\data files\*.* A:\. Note that there is a space betyeen *.* and A:. You would then save it as Charlie(or whatever name you wanted to give it).bat. You could save it in your C: drive. Then if you go to drive C: and type in Charlie, it would copy the files to a floppy in drive A: It's been a long while since I've done this, so as I said, I may not be 100% correct.
24giovanni
07-11-2006, 09:25 PM
Frank, thanks for that. One problem when i do that I can't change the extension to .bat for some reason. This is what I tried. I opened a text doc and entered in the following
iexplore.exe www.cnn.com
iexplore.exe www.si.com
and then tried to save it ca call it sites.bat but my PC won't change the extension to .bat What would cause that? thanks for any help.
jlreich
07-11-2006, 09:44 PM
When you save the file in the "save as type:" drop down box save it as "all files". Then name it sites.bat. If you don't do that it will save it as a text file regardless of what you name it. For example it will name it "sites.bat.txt". Which will not work.
24giovanni
07-11-2006, 09:54 PM
ok...the probs i was having is i had my hide extensions for known file types checked off so now i can see the .bat extension but my syntax is incorrect.
Paul Komski
07-12-2006, 04:47 AM
One nice little 'trick' when you want to 'Save As' is to contain the full name of the file and its extension inside inverted commas. Thus if you go to save a file called "sites.bat" (and not sites.bat without parenthesis) it doesnt matter what the preset file type is. ;)
jlreich
07-12-2006, 07:34 AM
Cool. I think I remember that from somewhere, but had forgotten it. :rolleyes: Good to know. Thanks Paul. :)
FrankSG
07-12-2006, 08:43 AM
Well--I was wrong when I said that you make your batch file using NotePad. It was NotePad that I used when I made my HTML files. Before I had Windows on my system, I went into the DOS folder (or as it was called then, the "directory") When I was in the DOS directory I would type in "Edit" and then the name of the batch file. I think it brought up another window in which I typed in my commands. I then saved it in whatever directory I wanted. With WinXP, you have to get into the Windows\System32 folder to make the file. I used to make a lot of batch files before I had Windows. But, since I haven't used it for awhile, I forgot a lot of it.
jlreich
07-12-2006, 09:11 AM
I was wrong when I said that you make your batch file using NotePad.
No you were correct, you can use notepad to write batch files. You just have to save it with the .bat extension just like in Edit. :)
FrankSG
07-12-2006, 10:23 AM
No you were correct, you can use notepad to write batch files. You just have to save it with the .bat extension just like in Edit. :)
I'll be darn! It's like I always told my grandchildren: The only time I ever made a mistake was the time I thought I was wrong, but I wasn't. :cool: :)
24giovanni
07-12-2006, 11:14 AM
the correct syntax was the following
"c:\program files\mozilla firefox\firefox" google.com
or replace FF internt exploror\iexplore if you use IE
vBulletin v3.6.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.