Search : in
By :

Creating batch file

Last answer on Sep 22, 2009 8:15:49 am BST shuchi, on Jun 4, 2009 7:25:41 am BST 
 Report this message to moderators

Hello,

i want to know

how to create batch file that do the following:
(a).show system date and time,
(b).change the prompt to your name,
(c).show the contents of the subdirectory.

Configuration: Windows XP Internet Explorer 6.0

Best answers for « creating batch file » in :
What is a batch file? ShowWhat is a batch file? Creating a batch file Prerequisites Create file Windows comes with a version of DOS, which allows you,exploiting the features and the sequence of commands in a script. Batch file, is a simple text file (ascii)...
[Shell]Create a file having a specific size ShowShell]Create a file having a specific size The dd command allows you to create "empty" file of desired size, creating these arbitrary heavy files, may be useful for testing purposes. Use command below: dd if=/dev/zero of=file_to...
Creation of file with specific size ShowCreation of file with specific size The command dd allows you to create new files with specific size in order to avoid creating large sized file for testing purposes: dd if=/dev/zero of=file_to_create bs=1k count=1000 The above...
Download PDF Creator ShowSupports Windows 7 Beta PDFCreator is a free tool to create PDF files from almost any application that can print. It also possesses options of security allowing to code the PDF to protect their reading. PDF Creator also allows to create images...
Download LC ISO Creator ShowLC ISO Creator is very simple: it allows to create a .ISO file from your CD. Then, it allows you to burn these ISO files, to use CD emulation software (in order not to use any more the original CD) or to make a backup copy. The software is...
Download Ext2 Installable File System ShowIf you currently have Windows running and you realize that you need some files for your work which you have stored on an Ext2 volume of your Linux installation, you no longer have to shut down Windows and boot Linux! Furthermore, Windows will now...

1

timeman76, on Jun 4, 2009 8:39:57 am BST

First you should try to create your batch file, using notepad. The steps are describe in this tiphttp://en.kioskea.net/faq/sujet 1051 batch file.

Once the file is created, you can then implement the necessary features allowing it to display :

System date and time, show the contents of the subdirectory and change the prompt to your name.

For this part i'll recommend you to check out Microsoft website to have the necessary information.

Reply to timeman76

2

shuchi, on Jun 5, 2009 6:10:55 am BST

I asked u a question about creating a batch file for

System date and time, show the contents of the subdirectory and change the prompt to your name.

plz give me proper syntax...i dnt know how to sove these problems..

Reply to shuchi

3

guest, on Jun 6, 2009 12:27:48 am BST

Do you own homework, don't be lazy.

Reply to guest

4

NoNam3, on Jul 26, 2009 11:32:45 am BST

Hello,

i want to know

how to create batch file that do the following:
(a).show system date and time,
(b).change the prompt to your name,
(c).show the contents of the subdirectory.

Configuration: Windows XP Internet Explorer 6.0

ok solution...

A) show date and time

copy this into notepad and rename it as xxx.bat

*********************<Do Not Include This Star>****************

@echo off
echo Date:%date%
echo Time:%time%
pause

*********************<Do Not Include This Star>****************

after u run the bat file you will see date and time inside cmd box.

or
u may want to make it as msg box, here the syntax.. same way copy and paste to notepad and rename it
to xxx.bat


*********************<Do Not Include This Star>****************

@echo off
msg * Date: %date% Time:%time%
exit

*********************<Do Not Include This Star>****************
after u run it,the msg box will appear and tells you about date and time.but not the cmd.


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

B) change the prompt to your name,

sorry really don't understand what u mean by that. Pls be more specified .


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

C) show the contents of the subdirectory.

sorry really don't understand what u mean by that. Pls be more specified .

Reply to NoNam3

5

 Mwanasoft, on Sep 22, 2009 8:15:49 am BST

Answer to the below questions is as follows according to me

Hello,

i want to know

how to create batch file that do the following:
(a).show system date and time,
(b).change the prompt to your name,
(c).show the contents of the subdirectory.

Hope you know how to create a .bat file so have the following commands in your .bat file

1. @echo off

2. echo Date:%date%
3. echo Time:%time%

4. prompt Mwanasoft

5. dir

Please don't number the commands as i have done.
Just a little explanation of the lines (Commands)

Line1. will turns command-echoing off.
Line2. Will display the current date
Line3. Will display the current time
Line 4. Will change the prompt name to 'Mwanasoft' you can replace that with your name.
Line 5. Will displays a list of files and subdirectories in a directory.

Have a nice day and enjoy!!!

Reply to Mwanasoft