DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Shell Scripting (http://www.daniweb.com/forums/forum113.html)
-   -   Please help me write this simple script (http://www.daniweb.com/forums/thread105786.html)

vnairp11 Jan 22nd, 2008 1:40 pm
Please help me write this simple script
 
I need a script that will do the following tasks

Write and test a script called ExpWord.cmd that would do the following:

copy all the files in the Exploring Word directory to a new directory on your H drive called ExpWord

Use a wild card character to delete all that files in the ExpWord directory that start with the word Chapter.

Output the directory listing for ExpWord to a file called ExpWord.doc located at the root directory of your H dirve.

If an error was detected in any of the steps above
 display an appropriate error message (For example: “Error detected in the copy command!” )
 pause and then exit the shell.


Write and test a script called ExcelFiles.cmd that would do the following:


Generate a report that will provide a listing of all the Excel files on your H: drive and redirect that report to a file called ExcelFiles.doc located at the root directory on your H drive.

vnairp11 Jan 22nd, 2008 1:42 pm
Re: Please help me write this simple script
 
I did this much so far but i donno how to do the echo commands

md "I:\ExpWord" 

start /d "I:\Exploring Word" /b

copy "H:\Exploring Word\chapter 1*.doc" "I:\ExpWord\"

start /d "I:\Exploring Word" /b

dir > "H:\ExpWord.doc"


All times are GMT -4. The time now is 9:50 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC