© J.C. Kessels 2009
MyDefrag Forum
June 19, 2013, 06:38:21 pm
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
MyDefrag Forum
>
JkDefrag v3 Forum
>
Questions and help
>
Using Batch Files
Pages:
1
[
2
]
« previous
next »
Print
Author
Topic: Using Batch Files (Read 4284 times)
skozzy
JkDefrag Senior
Posts: 28
Re: Using Batch Files
«
Reply #15 on:
October 01, 2010, 12:27:28 am »
Command Prompt is where you can issue commands to the computer or execute (run) a batch file, in windows most batch files end with .BAT in the filename, a batch file and run program (like MyDefrag) or do most things you can do with a mouse on your desktop screen.
an example batch filename is RUNME.BAT
A Script (for MyDefrag) would normaly end with .myd and inside that script would be all the commands that MyDefrag understands. (inside the help file is all the commands)
an example script filename would be defragandshutdown.myd
So using the two example filenames the batch file called RUNME.BAT would have in it a command like c:\program files\mydefrag\defragandshutdown.myd, then inside the script would the command you issue to mydefrag to do what your want, like defrag then shutdown.
So a batch file can control the computer or run programs
A script can control mydefrag
Both can be edited and made using a text editor.
Where are you trying to run the batch file from. Is it the command prompt, or in the Startup from windows 'Start/Programs/Startup' or the task scheduler ? or some other way. There is a good chance you don't need a batch file but only a MyDefrag script.
Logged
poutnik
JkDefrag Hero
Posts: 1106
Re: Using Batch Files
«
Reply #16 on:
October 01, 2010, 06:13:45 am »
Location of batch fully depends on your preferences and intention, there is no difference between batches and scripts here.
A BAT/CMD ( in fact cmd should be preferred for NT cmd.exe ) batch has a significant advantage you can call a script with different command line parameters.
By this way you can modify behavior of you custom script, having e.g. just one script for both daily and weekly run.
E.g. you can replace fileactions "Defragment() Fastfill()" by macro !Factions!
and than call script C:\Utils\dfrc.myd -m "Factions=Defragment(chunksize(64)) FastFill()" for daily run
or C:\Utils\dfrc.myd -m "Factions=Defragment(chunksize(64)) FastFill(WithShuffling)" for weekly run.
You can have several such replacement in the script and command line at once.
Same service as batch files can give you Windows shortcut LNK files, putting command line there, or provide parameters to command line with script.
Batches are more handy for frequent editing, and more suitable if multiple actions aside of script running are required.
«
Last Edit: October 01, 2010, 06:22:59 am by poutnik
»
Logged
It can be fast, good or easy. You can pick just 2 of them....
Treating Spacehog zone by the same effort as Boot zone is like cleaning a garden by the same effort as a living room.
ricky12heather
Newbie
Posts: 1
Re: Using Batch Files
«
Reply #17 on:
December 21, 2010, 11:59:19 am »
With respect to Microsoft Windows, batch file means a text file containing a series of commands which are to be executed by command interpreter. Batch files are mostly used for running a sequence of those executable files automatically. Thus Batch files are often used to automate repetitive or tedious processes of execution.
Logged
freight quote
shane8gibson
Newbie
Posts: 2
Beauty is simply reality seen with the eyes of lov
Re: Using Batch Files
«
Reply #18 on:
January 01, 2011, 07:01:19 am »
Update the command so that I can get into it.
Logged
Pages:
1
[
2
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
MyDefrag v4 Forum
-----------------------------
=> Announcements
=> Questions and help
=> Bugs and problems
=> Requests for new features
=> Scripts, and other contributions
-----------------------------
JkDefrag v3 Forum
-----------------------------
=> Announcements
=> Questions and help
=> Bugs and problems
=> Requests for new features
=> Programming with the library
Loading...