Welcome Guest.   Make a donation to an author on the site October 01, 2014, 01:08:33 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Check out and download the GOE 2007 Freeware Challenge productivity tools.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Need help regarding DOS and BAT files.  (Read 5915 times)
hulkbuster
Participant
*
Posts: 202


see users location on a map View Profile Give some DonationCredits to this forum member
« on: April 14, 2010, 05:29:16 PM »


Hello folks, i need some advise. u see i really want to learn more about making Batch file n DOS. Although i had some training in DOS in my formative years; but  that was only basics.
         I serched through web and couldn't find any decent materials, only some examples. Although making BAT file to run some appli isn't new or hard for me. Its because i want to advance to learn C++ (i did learn C++, but it was on unusual time, back then i wasn't interested and uncooperative with teachers). I heard that making/learning BATCH file is the basic to learn any programming language.
          Could someone help me here regarding my query i.e.,( understanding ONLY BATCH FILE AND DOS). Any suggestion welcomed.

Many regards. cheesy
Logged

Autorun Virus Remover.V.2.3 / Default Win7 Firewall / Shadow Defender.V.1.2 / Some Sense
MilesAhead
Member
**
Posts: 4,865



View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: April 14, 2010, 05:44:23 PM »

As good a place to start as any:

http://www.microsoft.com/...n-us/ntcmds.mspx?mfr=true


For easy to learn scripting language try AutoIt3.  It's free and has a simple syntax.
http://www.autoitscript.com/autoit3/index.shtml

Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: April 14, 2010, 05:44:53 PM »

I heard that making/learning BATCH file is the basic to learn any programming language.
ohmy ohmy ohmy

I wouldn't advise anyone to mess with batch files to learn programming. It's very limited in functionality, you have to work around instead of with the language to get things done, and it's not easy to structure things for easy readability.

If you want to start with a scripting language, something like Python would be a much better choice. And for an OOP language, I'd suggest Java (yes, Java and not C++... C++ is a big mouthful and it's easy to get lost in language technicalities instead of actually learning programming). C# is also pretty nice, but I'd consider Java easier "getting into".
Logged

- carpe noctem
daddydave
Supporting Member
**
Posts: 818



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #3 on: April 15, 2010, 10:58:33 AM »

Although I don't really call myself a programmer, I do tend to have pretty strong opinions on programmery things. ohmy

1. I share f0dder's skepticism that batch is a gateway language to C++ and also his statement that "you have to work around instead of with the language to get things done." However, I think it is still worth learning batch in itself, it is becoming kind of a lost art and there is still value in it as a Windows user. No comment on Java.

2. I have a few links related to creating advanced batch files.

Timo Salmi's Assorted Batch Tricks
Ritchie Lawrence's Batch Function Library
HFSlip - a complete slipstreaming tool for Windows 2000/XP written as a 30+ page batch file

3. I agree with MilesAhead's recommendation of AutoIt3 for a nice scripting, get-things-done type language, especially in conjunction with Scite4Autoit3 and the Koda Form Designer. Autoit3 is much like Autohotkey, with a little more humane syntax, I think. The help file is very good too, every function has a nice short example.
« Last Edit: April 15, 2010, 11:01:51 AM by daddydave » Logged
rjbull
Charter Member
***
Posts: 2,760

View Profile Give some DonationCredits to this forum member
« Reply #4 on: April 15, 2010, 03:24:34 PM »

More useful batch stuff here: Getting started with batch files

f0dder's right about having to work around batch file limitations.  In which case, don't overlook Horst Schaeffer's Batch tools & utilities for the MS-DOS operating system, where you can many word-around aids.
Logged
3of0
Supporting Member
**
Posts: 30



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #5 on: April 15, 2010, 03:43:12 PM »

I don't consider myself a programmer either (yet), I'm with f00der & daddydave.  They've already said what I would say.  Batch scripting is still useful, but I wouldn't suggest it for anything big.  And I'd agree with trying Python or Java first.

How to Teach Yourself Programming - Teach yourself C++ in 21 days.
Teach Yourself Programming in Ten Years - From the bottom of the comic.  Kind of long, but interesting read.

If you've already learned some C++, you might try finding some online tutorials and see how much you do remember.  You might not want/need to jumpstart yourself with other languages.
« Last Edit: April 15, 2010, 03:45:11 PM by 3of0 » Logged
Tuxman
Supporting Member
**
Posts: 1,480


OMG not him again!

View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: April 15, 2010, 05:58:36 PM »

it's easy to get lost in language technicalities instead of actually learning programming
Yep, with Java it is easier to "learn programming". There is a library for everything, so basically it is just C&P.
Sooo much better than C++ where you actually have to understand how to code.

(Sarcasm, anyone?)
Logged

I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.
- @VeryGrumpyCat
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: April 15, 2010, 06:14:29 PM »

I think you completely missed the point, Tuxman.

Language technicalities != libraries. Anybody who has had to deal with template errors, code behaving inconsistently because of subtle language rules allowing aggressive optimizations, implicit conversions you didn't expect, et cetera(!) would probably agree with me that C++ isn't the best language to start with. Java is just a lot friendlier in that regard.

"There is a library for everything, so basically it is just C&P." is bullshit, and using existing libraries doesn't mean you aren't going to understand what you're doing. When is the last time you wrote your own memory manager, anyway?
Logged

- carpe noctem
Tuxman
Supporting Member
**
Posts: 1,480


OMG not him again!

View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: April 15, 2010, 06:23:36 PM »

I never had to.

C++ might have some difficulties Java does not have; but it all depends on how you are going to work later. Most Java "programmers" don't actually program, they only complete already existing code bases. See, it is also a question of idealism. To me, people who let their IDE generate the boilerplates are, maybe, "developers", but programming is something quite different.

Sure, getting into the finesses is harder in C++. But once you understood why something does what, you are able to work with it. That's what it is all about, right?

If hulkbuster wants to learn how to be a programmer, IDE-driven languages like Java are not the way to go IMO.
(Yep, sure, all Java programmers on DC code with pure Notepad and cmd. Well then. ;-))
Logged

I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.
- @VeryGrumpyCat
rjbull
Charter Member
***
Posts: 2,760

View Profile Give some DonationCredits to this forum member
« Reply #9 on: April 18, 2010, 11:27:42 AM »

I serched through web and couldn't find any decent materials

One of the books I found useful was one by Dan Gookin, Advanced MS-DOS Batch File Programming.  You could try Advanced Book Exchange (ABE) to look for a copy.  Gookin intends to put his old stuff online: that hasn't happened yet, but he's made some of the companion disks freely available on his Wambooli Archives site.
Logged
tinjaw
Supporting Member
**
Posts: 1,926



I'm so glad breakbeat techno isn't an illegal drug

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: April 18, 2010, 10:52:16 PM »

If you want to start with a scripting language, something like Python would be a much better choice.

Logged

 
tinjaw
Supporting Member
**
Posts: 1,926



I'm so glad breakbeat techno isn't an illegal drug

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: April 18, 2010, 10:55:27 PM »

This is one of the better ones. There are others. But IMNSHO, you are better off starting with Python.
Logged

 
hulkbuster
Participant
*
Posts: 202


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #12 on: May 03, 2010, 03:47:18 PM »

Thank u all for ur valuable inputs, lately i was busy with other things.
Now i can browse through these links and see where i'll get. This is the first place i got any real material/understanding about  FIRST PLACE FOR BATCH and another SECOND PLACE.
Guess i'll h' to do a lot of headscratching with Python too  cheesy
Thank u Thmbsup: MilesAhead ,daddydave ,rjbull ,3of0 ,and tinjaw , u all were of great help. beerchug

I havn't  gone thru all of them , but i'll do from now (...period) tinjaw h' u reached anywhere with Python, did u find it easy, just checking...

MANY THANKS: smiley
Logged

Autorun Virus Remover.V.2.3 / Default Win7 Firewall / Shadow Defender.V.1.2 / Some Sense
tinjaw
Supporting Member
**
Posts: 1,926



I'm so glad breakbeat techno isn't an illegal drug

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: May 06, 2010, 08:30:01 AM »

tinjaw h' u reached anywhere with Python, did u find it easy, just checking...

Yes, I love Python and use it every day in my day job and every night for fun.
Logged

 
widgewunner
Member
**
Posts: 86


View Profile Give some DonationCredits to this forum member
« Reply #14 on: May 07, 2010, 05:11:36 PM »

I would recommend first learning basic C syntax. Start with the classic K&R book (It is short and gets straight to the point):

C Programming Language (2nd Edition) by Brian W. Kernighan and Dennis M. Ritchie

Its not cheap but its worth every penny. C is the foundation of many popular languages: (C++, PHP, Java, Javascript and more). ANSI C hasn't changed a bit in 22 years.
Logged
hulkbuster
Participant
*
Posts: 202


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #15 on: May 11, 2010, 02:56:37 AM »

I would recommend first learning basic C syntax. Start with the classic K&R book (It is short and gets straight to the point):

C Programming Language (2nd Edition) by Brian W. Kernighan and Dennis M. Ritchie

Its not cheap but its worth every penny. C is the foundation of many popular languages: (C++, PHP, Java, Javascript and more). ANSI C hasn't changed a bit in 22 years.

Hello widgewunner i had learnt a bit of C language in my formative years: i can remember doing this
[copy or print]
#include:
io stream.h
can't recall much and can't recall the Program we used to Practice , can u suggest any program for using specifically C language only :
i know learning c language wont be too much of a head banging.

Many thanks:
« Last Edit: May 11, 2010, 02:59:28 AM by hulkbuster » Logged

Autorun Virus Remover.V.2.3 / Default Win7 Firewall / Shadow Defender.V.1.2 / Some Sense
widgewunner
Member
**
Posts: 86


View Profile Give some DonationCredits to this forum member
« Reply #16 on: May 11, 2010, 08:29:49 PM »

The C compiler I use is not free (I use MS Visual c++ 6.0). You can get a free version from MS (the "express" version) but from my limited trial with that version I found it to be pretty bloated and crippled. There is also a free version of of the older Borland C compiler but I don't have any experience with that version.

What I would do is get and read the K&R book and start playing around with PHP. Its free, very C like, and has a lot of nice additional features on top of it. The documentation is great too. And PHP is a very handy technology to know if you plan on doing anything web related.
smiley
Logged
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #17 on: May 12, 2010, 06:04:58 AM »

The C compiler I use is not free (I use MS Visual c++ 6.0). You can get a free version from MS (the "express" version) but from my limited trial with that version I found it to be pretty bloated and crippled.
Crippled in what way? Funny that you say you use VC6 and call the express editions crippled, considering the amount of bugs and level of C++ compliance in VC6 :p
Logged

- carpe noctem
widgewunner
Member
**
Posts: 86


View Profile Give some DonationCredits to this forum member
« Reply #18 on: May 12, 2010, 11:30:50 PM »

By "crippled" I meant it had reduced/hobbled functionality. As I recall, the 2005 Express edition did not allow compiling a full fledged GUI app, only a command line console app. Can't say if the newer "Express" version has these sorts of limitations...
Logged
daddydave
Supporting Member
**
Posts: 818



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #19 on: May 13, 2010, 04:39:00 AM »

By "crippled" I meant it had reduced/hobbled functionality. As I recall, the 2005 Express edition did not allow compiling a full fledged GUI app, only a command line console app. Can't say if the newer "Express" version has these sorts of limitations...

I've played around with both 2005 and 2008 versions of Visual C++ and both alllowed compiling GUI apps. My recollection is this. With 2005, you had to do some extra work to be able to complile non-dotnet apps, but once you did, you were set. In 2008, it was built in. Can't say for 2010. One limitation I did notice is that the Express 2008 version didn't let you compile Windows Mobile apps.
Logged
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #20 on: May 13, 2010, 05:07:37 AM »

With 2005, you had to do some extra work to be able to complile non-dotnet apps, but once you did, you were set.
IIRC, it was just the PlatformSDK that wasn't included with 2005 express, so yeah - just download that, and you were set.

There's a few things about Express that could be show-stoppers for some:
1) they don't include MFC.
2) they don't include the resource editor.
3) some of the advanced functionality from the pro versions are missing, but it's stuff most won't miss.

I don't see #1 as a problem, unless you have to deal with legacy codebases using MFC. #2 is a bit more of a "real" problem, but there's 3rd party resource editors around. And if you need the stuff from #3, you're probably doing professional development and then it's sorta fair you pay for the suite smiley
Logged

- carpe noctem
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.049s | Server load: 0.14 ]