Getting multiple files in a single batch file
Encoding Binary files in Batch files
For NT commands see Help for all NT Version 4.0 commands APPEND Locating Application Files. ATTRIB Specifying the Read-only and Archive Attributes BACKUP Backing Up Files between Drives BREAK Checking Whether Break Was Invoked CHCP Changing the Code Page CHDIR Changing the Current Directory CHKDSK Checking Disk Space CLS Clearing the Screen COMMAND Invoking a Second Command Processor COMP Comparing Files COPY Copying Files CTTY Changing to a Remote Terminal DATE Displaying the Current Date DEL Deleting Files ERASE Erasing Files DIR Listing Files in a Directory DISKCOMP Comparing Disks DISKCOPY Copying Disks EXE2BIN Converting .EXE Files to .BIN Files FASTOPEN Storing Recently Opened Files in Memory FDISK Partitioning the Hard Disk FIND Finding Strings Within Files FORMAT Formatting Disks GRAFTABL Loading Graphics Characters GRAPHICS Printing a Graphics Screen JOIN Joining Drives via a Directory KEYB Loading Foreign Keyboards (PC-DOS 3.3 only) KEYBxx Loading Foreign Keyboards LABEL Modifying Volume Labels MKDIR Creating New Subdirectories MODE Setting Device Modes MORE Displaying One Screen at a Time NLSFUNC Selecting Code Pages with CHCP PATH Searching a Specified Path PRINT Printing Files PROMPT Changing the System Prompt RECOVER Recovering Damaged Files RENAME Renaming Files REPLACE Replacing Selected Files RESTORE Restoring Backed-up Files RMDIR Removing Directories SELECT Selecting Keyboard and Date Format When Installing DOS SET Setting Operating Parameters SHARE Loading Support for Network File-Sharing SORT Sorting Text Data SUBST Substituting Drive Designators SYS Copying System Files to Another Disk TIME Displaying the Current Time TREE Displaying Directory Trees TYPE Displaying the File Contents VER Displaying the DOS Version VERIFY Verifying Data VOL Displaying the Disk Volume Name XCOPY Copying Selected Files
The old DOS method of creating a zero length file by issing: REM>ZERO.DAT works under Windows 9x but won't work under Windows NT/2000/XP. The command: TYPE ZERO.DAT > ZERO.DAT will work under all versions of Windows and DOS. assuming that ZERO.DAT does not exist before the type command.
Lots of batch files require you to supply file name parameters without extension so that an output file can be made with a new extension or they will require the full output file name as a seperate parameter. Automatically providing an output file name with a new extension turns out to be pretty easy: Just make the output file with %1ext and then ren %1ext *.ext where %1 is the full input file name and ext is whatever you want the extension to be. This works in '98, NT and XP.
See also:
Questions:
Hi guys
I want to copy file using XCOPY/D:mm-dd-yyyy command
I would like the batch file to automatically enter a date as a variable.(not the current date). I was looking all over the net for answer. can't find any....please help
James Newton replies: Rob has that at http://www.robvanderwoude.com/datetime.html but doing math on a date may require NT or XP. I'm not sure it has been done in standard DOS.+
file: /Techref/dos/commands.htm, 8KB, , updated: 2013/7/22 16:11, local time: 2024/11/8 14:37,
18.216.149.49:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/Techref/dos/commands.htm"> DOS Command reference</A> |
Did you find what you needed? |
PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to www.piclist.com! |
.