Difference between revisions of "Batch Script"
From BC$ MobileTV Wiki
Line 45: | Line 45: | ||
* Getting the Most out of Windows Command Prompt: http://www.powercram.com/2009/12/getting-most-out-of-windows-command.html | * Getting the Most out of Windows Command Prompt: http://www.powercram.com/2009/12/getting-most-out-of-windows-command.html | ||
* TCP/IP and Networking Tools: http://commandwindows.com/tcpiputil.htm | * TCP/IP and Networking Tools: http://commandwindows.com/tcpiputil.htm | ||
+ | * Is there anything that Windows does better than OS X?: http://www.quora.com/Is-there-anything-that-Windows-does-better-than-OS-X (ANSWER: PowerShell) | ||
== References == | == References == |
Revision as of 18:03, 21 September 2015
A Batch Script is a piece of system-level program logic which can control specific system functions via a command prompt (most commonly Batch is supported in Windows server environments but may be ported to others).
Commands
To pass a specific command-line input parameter from a Batch script to a called program within it, use:
%1 %2 %3 ... %15
For the first, second, third and fifteenth parameter (etc).
To pass through all command-line input parameters from a Batch script to a called program within it, use:
%*
Resources
- wikipedia: Autorun.inf[2]
- Replace.exe Bulk File Find / Replace Command Line Tool: http://www.bestcode.com/html/findreplace.html
- wget for windows: http://gnuwin32.sourceforge.net/packages/wget.htm
- curl for windows: http://curl.haxx.se/download.html#Win32MSVC
- Spring Batch (REFERENCE): http://cdn.dzone.com/sites/all/files/refcardz/rc187-010d-spring-batch.pdf
Tutorials
- Using command redirection operators: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true
- How to unpack a tar file in windows: http://www.haskell.org/haskellwiki/How_to_unpack_a_tar_file_in_windows
- Is there replacement for cat on Windows: http://stackoverflow.com/questions/60244/is-there-replacement-for-cat-on-windows
- Remote Desktop - shortcut gone, where to find exe file?: http://www.softwaretipsandtricks.com/forum/windows-xp/23208-remote-desktop-shortcut-gone-where-find-exe-file.html (c:\windows\system32\mstsc.exe)
- Windows Command Line Environment Variables: http://libertyboy.free.fr/computing/reference/envariables/
External Links
- Batch script to delete file older than 30 days: http://en.kioskea.net/forum/affich-73016-batch-script-to-delete-file-older-than-30-day
- Easily identify services running inside Windows XP's processes: http://www.techrepublic.com/article/easily-identify-services-running-inside-windows-xps-processes/
- Windows Command Line Tips: http://www.scribd.com/doc/511785/Notes-Windows-Command-Line-Tips
- How to determine which program uses or blocks specific transmission control protocol ports in Windows: http://support.microsoft.com/kb/281336
- How to Kill Process that is Running on Certain Port in Windows?: http://laksmono.com/2009/12/02/how-to-kill-process-that-is-running-on-certain-port-in-windows/
- Getting the Most out of Windows Command Prompt: http://www.powercram.com/2009/12/getting-most-out-of-windows-command.html
- TCP/IP and Networking Tools: http://commandwindows.com/tcpiputil.htm
- Is there anything that Windows does better than OS X?: http://www.quora.com/Is-there-anything-that-Windows-does-better-than-OS-X (ANSWER: PowerShell)
References
- ↑ Is there a way to indicate the last n parameters in a batch file?: http://stackoverflow.com/questions/761615/is-there-a-way-to-indicate-the-last-n-parameters-in-a-batch-file
- ↑ http://stackoverflow.com/questions/12606609/autorun-inf-doesnt-work
See Also
Shell Script | Windows | DOS