Computing.Net > Forums > Disk Operating System > batch files

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch files

Reply to Message Icon

Name: Adam Gorecki
Date: December 6, 2000 at 12:10:02 Pacific
Comment:

At startup I want to make a login like page which users type their user ids and passwords, all users are assighned 6 character user ids. All user ids and passwords are saved in a file called password.dat at the root directory of C: and the structure of this file is designed as having one user id folloowed by two spaces and its passwords following by two spaces and the department that they are working at, in every row.



Sponsored Link
Ads by Google

Response Number 1
Name: DoOMsdAY
Date: December 7, 2000 at 03:46:24 Pacific
Reply:

Use a real language like Pascal or C or even Assembly (something that will handle remapping Ctrl+C and Ctrl+Break interrupts so someone can't use them to break out of your program).


0

Response Number 2
Name: Adam Gorecki
Date: December 7, 2000 at 09:26:50 Pacific
Reply:

I have a project for my computer class and we have to use batch files to create a login page with a user id(6 characters) and password. I know that I need to use the set command and the if command and the call command, but I don't know how to put it all together and put it in the right order.


0

Response Number 3
Name: Michael
Date: December 7, 2000 at 13:17:37 Pacific
Reply:

Adam,
DOS batch files are not designed for the type of thing you are (or rather your teacher)asking it to do. For one thing there is no built in way for DOS to handle input (at least the way your describing) from the user. You could probably download a COM from somewhere that will handle user input but I'm still not sure you would have the functionality you need to write the batch file. Tell your teacher he's crazy =). J/k.
-Michael


0

Response Number 4
Name: DoOMsdAY
Date: December 8, 2000 at 03:18:41 Pacific
Reply:

Actually if you write it in a real language you may impress your teacher and gain an "A". Since it's homework, I can't actually help you do any of it. If it's an assignment for a class, this must have already been discussed or is in a textbook. One suggestion if you're using real DOS (DOS 6.22 or earlier), try typing "help" from the command prompt and go looking through the commands available to you. And yes, set will be one of them I'm sure. Another place to check is Laurence's batch web page - to which I have the link at work, but I'm currently at home. It's very advanced and it'll probably require you to research what he's doing in a lot of the examples, but that's the whole point of a project anyway. I'll post that link (assuming Laurence doesn't beat me to it) when I get to work.


0

Response Number 5
Name: DoOMsdAY
Date: December 8, 2000 at 03:26:30 Pacific
Reply:

Batfiles: The DOS batch file programming handbook


0

Related Posts

See More



Response Number 6
Name: Adam Gorecki
Date: December 11, 2000 at 10:13:28 Pacific
Reply:

DoOMsdAY,

my batch file project is not homework. It is just an extra credit project. That is why the teacher hasn't explained anything to me. He is hoping that I will find all the necesary information on my own, but I have been searching and studying for days with no results. So I was wondering if you could help me piece some things together so I could understand better.

Thanks.


0

Response Number 7
Name: dos maniac
Date: December 18, 2000 at 05:10:16 Pacific
Reply:

DOS wont operate inthis manner. It cannot manage the username,password,section for validation. What you could do is maybe write it so that it is like this ( my dos commands are noot too good, I get by but am not brilliant)

@echo off
echo *Login Batch File*
find {file.name} %1
if True goto step2 find {file.name} %2
if false echo try again
exit
step2:
find {file.name} %2
if true goto step3
if false echo Try again
exit
step3:
find {file.name} %3
if true goto home
if false echo try again
exit
home:
path=path+\%3\%1\


--------------------------------------------
where %1 is the name
%2 is the password
and %3 is the section.

But it might not be too successful. You could give it a try though. I think thast Doomsdays idea of writing it in another language is better, C would be able to do it for you easily.

By the way the only reason I typed the batch file is that it probably wont work in this manner, the true false bit 2will have to be written correctly.


0

Sponsored Link
Ads by Google
Reply to Message Icon

sound driver Formating c & d drive...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: batch files

Help!! Batch File www.computing.net/answers/dos/help-batch-file/13525.html

Batch files - - Mapping network drive www.computing.net/answers/dos/batch-files-mapping-network-drive/3809.html

Pause batch file www.computing.net/answers/dos/pause-batch-file/2810.html