• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Help with writing a batch file please.

layne151

Senior member
I am trying to write a batch file to to do the following any help out there?

Change from the C drive to the A drive
Create a directory named TEST
Change to that directory
Copy all DOC files from C:\MY DOCUMENTS to A:\test
Give a directory listing of all the files in A:\TEST in alphabetical order
 
Copy and paste from below the line.
-------

@ECHO OFF
SET DIRCMD=/OGN
A:
MD TEST
CD TEST
COPY C:\MYDOCU~1\*.DOC
DIR /P
 
vi_edit: SET DIRCMD=/OGN means to set the DIR command environment to sort order with directories first, then files, in alphabetical order.
 
@echo off
goto begin

********************************************************************
copytest.bat

written 9.13.00
by spiff

this batch file will:

- Change from the C drive to the A drive
- Create a directory named TEST
- Change to that directory
- Copy all DOC files from C:\MY DOCUMENTS to A:\test
- Give a directory listing of all the files in A:\TEST in
alphabetical order
- Put directory listing into a file called MyDocs.txt

*********************************************************************

:begin

a:
md test
cd\test
copy "c:\my documents\*" a:\test\*
@echo on
dir a:\test /o
@echo off
dir a:\test /o >a:\Mydocs.txt

:end
 
Back
Top