| | |
Please help me write this simple script
![]() |
•
•
Join Date: Jan 2008
Posts: 2
Reputation:
Solved Threads: 0
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.
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.
•
•
Join Date: Jan 2008
Posts: 2
Reputation:
Solved Threads: 0
I did this much so far but i donno how to do the echo commands
Shell Scripting Syntax (Toggle Plain Text)
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"
![]() |
Similar Threads
- how can i pass a value from java script to JSP scriplet (JSP)
- Using the 'mv' command with paremeters in a script (Shell Scripting)
- Javascript - how to stop/halt/break this loop/script plss (JavaScript / DHTML / AJAX)
- connect one server from another server through script (PHP)
- Simple script loop question (Shell Scripting)
- help with my fist script (Shell Scripting)
- A simple perl script (Perl)
- script for fedora core 4 (Shell Scripting)
- A simple script to execute a command package (Shell Scripting)
- simple shell script....complex migraine (Shell Scripting)
Other Threads in the Shell Scripting Forum
- Previous Thread: awk "for loop" and variables
- Next Thread: Script to delete or backup logs at a specific time and under specific user
| Thread Tools | Search this Thread |





