Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a command line command which can unlock a folder using a password..eg: unlock 12345
here unlock is the command and 12345is the password..i have more than 100 passwords in a text file each in a single line..i want a batch script to check each password to unlock the folder.i.e the command unlock should use each password in the text file and check whick one is correct and it should unlock the folder..can any1 help me ?
Posted

1 solution

Firstly I should point out that having passwords in plain text is just silly - you may as well just put a post-it on the side of the machine.

But to answer your question ...
If you use scripting you can read text files ... have a look at this M$ article[^] and/or this list of links[^]

It would be far more secure to write a console application to do this for you, and properly encrypt the passwords (there are articles here on code project to help with that)
 
Share this answer
 
Comments
Member 10715106 6-Apr-14 0:28am    
i don want this in vb or visual studio.i want a batch script to execute a command..and the input to that command is a list of passwords..i want that command prompt command to fetch eazch password at a time and run on the dos environment....is there any batch script to perform this...
CHill60 6-Apr-14 11:09am    
Did you read the link to the Microsoft article? ... it tells you how to read files via scripting

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900