Not sure were I'm goeing with this but thought I would post.

Spud1200

Fully Optimized
Messages
2,556
Location
England, UK
I would love to create a Bach file for a multi use of pourpuses but have no idea what I'm doing with the command promp in Win 7 HP. I've been messing around but really confused. Not sure were I want to go with this other than I know I want to be able to create a small Batch file for a multi of pourpuses. Such as being able to delete files, create files, and mabie more complex tasks.

What can I use the bach file to do. Useing the notepad I've been playing around with createing and deleting ect. apart from typing Help, and thus getting a list of surpoted commands, I'm clueless. Any one any Idea were I can start, what I should do, and what can I do?

Can someone explaine because if I have to do anymore reading, I'm giveing up. :very_angry:
 
Well I would recommend typing "help" into cmd. That will give you a list of every command and their syntax. Out put that list to a text file then print it off. I believe output is something like this:

help>help.txt

I could be wrong if I am please correct me.
 
I would love to create a Bach file for a multi use of pourpuses but have no idea what I'm doing with the command promp in Win 7 HP. I've been messing around but really confused. Not sure were I want to go with this other than I know I want to be able to create a small Batch file for a multi of pourpuses. Such as being able to delete files, create files, and mabie more complex tasks.

What can I use the bach file to do. Useing the notepad I've been playing around with createing and deleting ect. apart from typing Help, and thus getting a list of surpoted commands, I'm clueless. Any one any Idea were I can start, what I should do, and what can I do?

Can someone explaine because if I have to do anymore reading, I'm giveing up. :very_angry:

What exactly are you wanting to do with the batch file? There's literally tons of things you can do with a batch file to automate processes... if you don't have a specific goal in mind, then you're not going to get anywhere. Batch files are tailored for specific jobs (deleting files for a certain condition / job, automating other parts of a system, etc.).

Check out: Batch File Help
and
MS-DOS help and commands

Those will give you decent starts to Batch files and MSDos commands.

Basically, pick a specific task for the batch file to do, layout how you want it to operate (i.e. does it prompt for user intervention or input at any point to continue or make a choice? what operations is it going to perform? what order should they be laid out in? etc.). Then figure out the exact syntax you need them to be in; Google will be a big help here. For example, to get input from a user just search for "batch file get user input" and you'll get a ton of results that'll show you different ways of how to get it done. You can take pieces of code that people have posted and put it in your own code to achieve what you want.

If you want, take a look at the few threads I've helped luke in for batch files; they give a bit of a diverse amount of operations to get you started on batch programming.

Oh, and if you're sick of reading to learn... then you might as well as just give up on everything because everything requires some reading / research to learn... Get used to it ;).
 
yeah. And thanks to carnage Iam now writing batch scripts to delete temp stuff and other things like the run menu etc
 
Ok, I've been playing around with Batch Codeing for the last 4 hours and learned "some" of what is possible. This code below is what I have Wrote within the Desktop enviroment. I also learned that you could easly create a .Bat file to execute a Number of Programs up on Booting the system via the Start up Folder with in the Start menu. Simply by useing the "Start" command thus the directory Path of the application.

For example ( Start C:\"Program Files"\"Internet Explorer"\iexplorer.exe )

@Echo off
echo This is a Test batch File that will Log the System Time and excecute a number of commands.
pause
CLS
echo. |time |find "current" >> SystemTimeLog.txt

Echo By continueing you will start the default browser at Google.co.uk
pause

CLS

Start /MIN http:\\Google

echo By continueing you will create a directory called test file and copy the System Time Log file.
pause
MKDIR C:\users\"Daniel Thompson"\Desktop\"Test File"
Copy C:\users\"Daniel Thompson"\Desktop\SystemTimeLog.txt C:\Users\"Daniel Thompson"\Desktop\"Test File"
del C:\users\"Daniel Thompson"\Desktop\SystemTimeLog.txt

echo The Following will display the system Time as to wich you may wish to reset it.
pause

echo.

Time

echo.

pause

And BTW that was not easy to learn CarnageX, I see what you mean when haveing to Read.
 
Ok, I've been playing around with Batch Codeing for the last 4 hours and learned "some" of what is possible. This code below is what I have Wrote within the Desktop enviroment. I also learned that you could easly create a .Bat file to execute a Number of Programs up on Booting the system via the Start up Folder with in the Start menu. Simply by useing the "Start" command thus the directory Path of the application.

For example ( Start C:\"Program Files"\"Internet Explorer"\iexplorer.exe )



And BTW that was not easy to learn CarnageX, I see what you mean when haveing to Read.

Just keep at it ;).

I haven't really done any batch programming up until a few months ago lol. Have wrote a few batch files for work to do some simple things (main one was backing up files on a DOS machine that we have that controls some large machinery for metalworking).
 
Just keep at it .

I haven't really done any batch programming up until a few months ago lol. Have wrote a few batch files for work to do some simple things (main one was backing up files on a DOS machine that we have that controls some large machinery for metalworking).

I'm trying to figure out Carnage what it is exacally I can use a Bach Script for on my system. I use CCleaner for all things Great and wounderfull for Cleaning the system. NOW THAT SEID I could create a Bach file with alot of Time and effort in wich Boot the system, Log in, Excecute the .bat file and thus have it do everything I would do when starting the System. For example, Booting IE, Firefox, Opera, and Safari, Boot a number of programs such as f@h CPU Console Client. But I'm curious as to what complex tasks I can accomplish with a Bach program. Any ideas?


Edit: Just found this on the site you mentioned. http://www.computerhope.com/msdos.htm

:D .. ..
 
Yeah it was hard for me to learn. However studying commands and syntax's for a few days and I was fine. I now use batch scripts to analyse my Local Drives for any issues as well as fragmentation. It's a heap quicker and the best part is it all runs in the background! :D
 
I'm trying to figure out how to incorparate some code in to a batch file that will require user input as such as the f@h console client were as you have to enter your name, user ID, and team number ect. I'm not even sure if this is possible with out haveing it comunicate via the internet with say a server or another PC. If I take for example what I seid about createing a batch file for all the tings I do when booting the system, its a complex task because you can have the .bat execute commands at timed intervals and I'm not sure how to wite that as I dont know it.

I'm not even sure the difference between the SET command and the ECHO. command. As from what I can tell they both do the same function with out the Syntaxes. Think thats rite. I tried to back up a file useing the bat file and would it heck recodnize the command, had to use COPY instead.
 
Hmm well I have a batch script that hides a folder with H and S permissions or Hidden and System permissions. Meaning that the folder is invisible unless you untick a few boxes in Folder Options. But to unlock the folder it requires a password. But it's a bit different to what your trying to do. Do you want me to post the script?
 
Back
Top Bottom