Status
Not open for further replies.
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

For DOS scripts (.bat files), I want to turn off DOS prompting, such as for
the DOS command "del *" DOS comes back and asks "Are you sure (Y/N)?". I can
not remember the command to do this DOS prompting as it ruins a DOS script.
Even if I could list the available DOS commands I could remember it. Please
help!
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

For scripts,try TechNet at microsoft.com-script center...

"dosguy" wrote:

> For DOS scripts (.bat files), I want to turn off DOS prompting, such as for
> the DOS command "del *" DOS comes back and asks "Are you sure (Y/N)?". I can
> not remember the command to do this DOS prompting as it ruins a DOS script.
> Even if I could list the available DOS commands I could remember it. Please
> help!
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

It's been awhile but I think the syntax is:
echo y| erase c:\temp\*.*
as an example.
Hope it works for ya...


"dosguy" wrote:

> For DOS scripts (.bat files), I want to turn off DOS prompting, such as for
> the DOS command "del *" DOS comes back and asks "Are you sure (Y/N)?". I can
> not remember the command to do this DOS prompting as it ruins a DOS script.
> Even if I could list the available DOS commands I could remember it. Please
> help!
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

dosguy wrote:
> For DOS scripts (.bat files), I want to turn off DOS prompting, such as for
> the DOS command "del *" DOS comes back and asks "Are you sure (Y/N)?". I can
> not remember the command to do this DOS prompting as it ruins a DOS script.
> Even if I could list the available DOS commands I could remember it. Please
> help!


To eliminate an No/Yes question, use the /Y switch right
after the command from the prompt. And switches can be
inserted into the same script line for the command, e.g.,

xcopy [d]:\directory\folder [d2]:\director\folder /Y
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

In XP
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\xxxx>help ?
This command is not supported by the help utility. Try "x
/?".

C:\Documents and Settings\xxx>help /?
Provides help information for Windows XP commands.

HELP [command]

command - displays help information on that command.

C:\Documents and Settings\xxx>help
For more information on a specific command, type HELP
command-name
ASSOC Displays or modifies file extension associations.
AT Schedules commands and programs to run on a
computer.
ATTRIB Displays or changes file attributes.
BREAK Sets or clears extended CTRL+C checking.
CACLS Displays or modifies access control lists (ACLs) of
files.
CALL Calls one batch program from another.
CD Displays the name of or changes the current
directory.
CHCP Displays or sets the active code page number.
CHDIR Displays the name of or changes the current
directory.
CHKDSK Checks a disk and displays a status report.
CHKNTFS Displays or modifies the checking of disk at boot
time.
CLS Clears the screen.
CMD Starts a new instance of the Windows command
interpreter.
COLOR Sets the default console foreground and background
colors.
COMP Compares the contents of two files or sets of
files.
COMPACT Displays or alters the compression of files on NTFS
partitions.
CONVERT Converts FAT volumes to NTFS. You cannot convert
the
current drive.
COPY Copies one or more files to another location.
DATE Displays or sets the date.
DEL Deletes one or more files.
DIR Displays a list of files and subdirectories in a
directory.
DISKCOMP Compares the contents of two floppy disks.
DISKCOPY Copies the contents of one floppy disk to another.
DOSKEY Edits command lines, recalls Windows commands, and
creates macros.
ECHO Displays messages, or turns command echoing on or
off.
ENDLOCAL Ends localization of environment changes in a batch
file.
ERASE Deletes one or more files.
EXIT Quits the CMD.EXE program (command interpreter).
FC Compares two files or sets of files, and displays
the differences
between them.
FIND Searches for a text string in a file or files.
FINDSTR Searches for strings in files.
FOR Runs a specified command for each file in a set of
files.
FORMAT Formats a disk for use with Windows.
FTYPE Displays or modifies file types used in file
extension associations.
GOTO Directs the Windows command interpreter to a
labeled line in a
batch program.
GRAFTABL Enables Windows to display an extended character
set in graphics
mode.
HELP Provides Help information for Windows commands.
IF Performs conditional processing in batch programs.
LABEL Creates, changes, or deletes the volume label of a
disk.
MD Creates a directory.
MKDIR Creates a directory.
MODE Configures a system device.
MORE Displays output one screen at a time.
MOVE Moves one or more files from one directory to
another directory.
PATH Displays or sets a search path for executable
files.
PAUSE Suspends processing of a batch file and displays a
message.
POPD Restores the previous value of the current
directory saved by PUSHD.
PRINT Prints a text file.
PROMPT Changes the Windows command prompt.
PUSHD Saves the current directory then changes it.
RD Removes a directory.
RECOVER Recovers readable information from a bad or
defective disk.
REM Records comments (remarks) in batch files or
CONFIG.SYS.
REN Renames a file or files.
RENAME Renames a file or files.
REPLACE Replaces files.
RMDIR Removes a directory.
SET Displays, sets, or removes Windows environment
variables.
SETLOCAL Begins localization of environment changes in a
batch file.
SHIFT Shifts the position of replaceable parameters in
batch files.
SORT Sorts input.
START Starts a separate window to run a specified program
or command.
SUBST Associates a path with a drive letter.
TIME Displays or sets the system time.
TITLE Sets the window title for a CMD.EXE session.
TREE Graphically displays the directory structure of a
drive or path.
TYPE Displays the contents of a text file.
VER Displays the Windows version.
VERIFY Tells Windows whether to verify that your files are
written
correctly to a disk.
VOL Displays a disk volume label and serial number.
XCOPY Copies files and directory trees.


--
The people think the Constitution protects their rights;
But government sees it as an obstacle to be overcome.
some support
http://www.usdoj.gov/olc/secondamendment2.htm



"dosguy" <dosguy@discussions.microsoft.com> wrote in message
news:A54608E8-BFA1-4CFE-96A7-1466D57845F8@microsoft.com...
| For DOS scripts (.bat files), I want to turn off DOS
prompting, such as for
| the DOS command "del *" DOS comes back and asks "Are you
sure (Y/N)?". I can
| not remember the command to do this DOS prompting as it
ruins a DOS script.
| Even if I could list the available DOS commands I could
remember it. Please
| help!
 

Jon

Distinguished
Dec 4, 2003
618
0
18,980
Archived from groups: microsoft.public.windowsxp.general (More info?)

Will vary from command to command, but for the "del" command, use


del * /q

rather than just

del *


Type del /? for full set of options

Jon


"dosguy" <dosguy@discussions.microsoft.com> wrote in message
news:A54608E8-BFA1-4CFE-96A7-1466D57845F8@microsoft.com...
> For DOS scripts (.bat files), I want to turn off DOS prompting, such as
> for
> the DOS command "del *" DOS comes back and asks "Are you sure (Y/N)?". I
> can
> not remember the command to do this DOS prompting as it ruins a DOS
> script.
> Even if I could list the available DOS commands I could remember it.
> Please
> help!
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

Jim Macklin wrote:
> In XP
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\xxxx>help ?
> This command is not supported by the help utility. Try "x
> /?".
>
> C:\Documents and Settings\xxx>help /?
> Provides help information for Windows XP commands.
>
> HELP [command]
>
> command - displays help information on that command.
>
> C:\Documents and Settings\xxx>help
> For more information on a specific command, type HELP
> command-name
> ASSOC Displays or modifies file extension associations.
> AT Schedules commands and programs to run on a
> computer.
> ATTRIB Displays or changes file attributes.
> BREAK Sets or clears extended CTRL+C checking.
> CACLS Displays or modifies access control lists (ACLs) of
> files.
> CALL Calls one batch program from another.
> CD Displays the name of or changes the current
> directory.
> CHCP Displays or sets the active code page number.
> CHDIR Displays the name of or changes the current
> directory.
> CHKDSK Checks a disk and displays a status report.
> CHKNTFS Displays or modifies the checking of disk at boot
> time.
> CLS Clears the screen.
> CMD Starts a new instance of the Windows command
> interpreter.
> COLOR Sets the default console foreground and background
> colors.
> COMP Compares the contents of two files or sets of
> files.
> COMPACT Displays or alters the compression of files on NTFS
> partitions.
> CONVERT Converts FAT volumes to NTFS. You cannot convert
> the
> current drive.
> COPY Copies one or more files to another location.
> DATE Displays or sets the date.
> DEL Deletes one or more files.
> DIR Displays a list of files and subdirectories in a
> directory.
> DISKCOMP Compares the contents of two floppy disks.
> DISKCOPY Copies the contents of one floppy disk to another.
> DOSKEY Edits command lines, recalls Windows commands, and
> creates macros.
> ECHO Displays messages, or turns command echoing on or
> off.
> ENDLOCAL Ends localization of environment changes in a batch
> file.
> ERASE Deletes one or more files.
> EXIT Quits the CMD.EXE program (command interpreter).
> FC Compares two files or sets of files, and displays
> the differences
> between them.
> FIND Searches for a text string in a file or files.
> FINDSTR Searches for strings in files.
> FOR Runs a specified command for each file in a set of
> files.
> FORMAT Formats a disk for use with Windows.
> FTYPE Displays or modifies file types used in file
> extension associations.
> GOTO Directs the Windows command interpreter to a
> labeled line in a
> batch program.
> GRAFTABL Enables Windows to display an extended character
> set in graphics
> mode.
> HELP Provides Help information for Windows commands.
> IF Performs conditional processing in batch programs.
> LABEL Creates, changes, or deletes the volume label of a
> disk.
> MD Creates a directory.
> MKDIR Creates a directory.
> MODE Configures a system device.
> MORE Displays output one screen at a time.
> MOVE Moves one or more files from one directory to
> another directory.
> PATH Displays or sets a search path for executable
> files.
> PAUSE Suspends processing of a batch file and displays a
> message.
> POPD Restores the previous value of the current
> directory saved by PUSHD.
> PRINT Prints a text file.
> PROMPT Changes the Windows command prompt.
> PUSHD Saves the current directory then changes it.
> RD Removes a directory.
> RECOVER Recovers readable information from a bad or
> defective disk.
> REM Records comments (remarks) in batch files or
> CONFIG.SYS.
> REN Renames a file or files.
> RENAME Renames a file or files.
> REPLACE Replaces files.
> RMDIR Removes a directory.
> SET Displays, sets, or removes Windows environment
> variables.
> SETLOCAL Begins localization of environment changes in a
> batch file.
> SHIFT Shifts the position of replaceable parameters in
> batch files.
> SORT Sorts input.
> START Starts a separate window to run a specified program
> or command.
> SUBST Associates a path with a drive letter.
> TIME Displays or sets the system time.
> TITLE Sets the window title for a CMD.EXE session.
> TREE Graphically displays the directory structure of a
> drive or path.
> TYPE Displays the contents of a text file.
> VER Displays the Windows version.
> VERIFY Tells Windows whether to verify that your files are
> written
> correctly to a disk.
> VOL Displays a disk volume label and serial number.
> XCOPY Copies files and directory trees.
>
>
>
> "dosguy" <dosguy@discussions.microsoft.com> wrote in message
> news:A54608E8-BFA1-4CFE-96A7-1466D57845F8@microsoft.com...
>> For DOS scripts (.bat files), I want to turn off DOS prompting, such
>> as for the DOS command "del *" DOS comes back and asks "Are you sure
>> (Y/N)?". I can not remember the command to do this DOS prompting as
>> it ruins a DOS script. Even if I could list the available DOS
>> commands I could remember it. Please help!


For more information on a specific command, type HELP command-name
ASSOC Displays or modifies file extension associations.
AT Schedules commands and programs to run on a computer.
ATTRIB Displays or changes file attributes.
BREAK Sets or clears extended CTRL+C checking.
CACLS Displays or modifies access control lists (ACLs) of files.
CALL Calls one batch program from another.
CD Displays the name of or changes the current directory.
CHCP Displays or sets the active code page number.
CHDIR Displays the name of or changes the current directory.
CHKDSK Checks a disk and displays a status report.
CHKNTFS Displays or modifies the checking of disk at boot time.
CLS Clears the screen.
CMD Starts a new instance of the Windows command interpreter.
COLOR Sets the default console foreground and background colors.
COMP Compares the contents of two files or sets of files.
COMPACT Displays or alters the compression of files on NTFS partitions.
CONVERT Converts FAT volumes to NTFS. You cannot convert the
current drive.
COPY Copies one or more files to another location.
DATE Displays or sets the date.
DEL Deletes one or more files.
DIR Displays a list of files and subdirectories in a directory.
DISKCOMP Compares the contents of two floppy disks.
DISKCOPY Copies the contents of one floppy disk to another.
DOSKEY Edits command lines, recalls Windows commands, and creates macros.
ECHO Displays messages, or turns command echoing on or off.
ENDLOCAL Ends localization of environment changes in a batch file.
ERASE Deletes one or more files.
EXIT Quits the CMD.EXE program (command interpreter).
FC Compares two files or sets of files, and displays the differences
between them.
FIND Searches for a text string in a file or files.
FINDSTR Searches for strings in files.
FOR Runs a specified command for each file in a set of files.
FORMAT Formats a disk for use with Windows.
FTYPE Displays or modifies file types used in file extension
associations.
GOTO Directs the Windows command interpreter to a labeled line in a
batch program.
GRAFTABL Enables Windows to display an extended character set in graphics
mode.
HELP Provides Help information for Windows commands.
IF Performs conditional processing in batch programs.
LABEL Creates, changes, or deletes the volume label of a disk.
MD Creates a directory.
MKDIR Creates a directory.
MODE Configures a system device.
MORE Displays output one screen at a time.
MOVE Moves one or more files from one directory to another directory.
PATH Displays or sets a search path for executable files.
PAUSE Suspends processing of a batch file and displays a message.
POPD Restores the previous value of the current directory saved by
PUSHD.
PRINT Prints a text file.
PROMPT Changes the Windows command prompt.
PUSHD Saves the current directory then changes it.
RD Removes a directory.
RECOVER Recovers readable information from a bad or defective disk.
REM Records comments (remarks) in batch files or CONFIG.SYS.
REN Renames a file or files.
RENAME Renames a file or files.
REPLACE Replaces files.
RMDIR Removes a directory.
SET Displays, sets, or removes Windows environment variables.
SETLOCAL Begins localization of environment changes in a batch file.
SHIFT Shifts the position of replaceable parameters in batch files.
SORT Sorts input.
START Starts a separate window to run a specified program or command.
SUBST Associates a path with a drive letter.
TIME Displays or sets the system time.
TITLE Sets the window title for a CMD.EXE session.
TREE Graphically displays the directory structure of a drive or path.
TYPE Displays the contents of a text file.
VER Displays the Windows version.
VERIFY Tells Windows whether to verify that your files are written
correctly to a disk.
VOL Displays a disk volume label and serial number.
XCOPY Copies files and directory trees.

--

Darrell R. Schmidt
B-58 Hustler History: http://members.cox.net/dschmidt1/
-
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

On Tue, 13 Sep 2005 22:28:02 -0700 in
microsoft.public.windowsxp.general, dosguy favored us with...
> For DOS scripts (.bat files), I want to turn off DOS prompting, such as for
> the DOS command "del *" DOS comes back and asks "Are you sure (Y/N)?". I can
> not remember the command to do this DOS prompting as it ruins a DOS script.
> Even if I could list the available DOS commands I could remember it. Please
> help!

To list the available commands, run this
> %systemroot%\hh.exe Ms-its:%systemroot%\help\ntcmds.chm::/ntcmds.htm

But you don't want a command, you want to pass a Y answer to that Y/N
prompt. A pipe, viz:
echo Y | del *
will do it.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"What in heaven's name brought you to Casablanca?"
"My health. I came to Casablanca for the waters."
"The waters? What waters? We're in the desert."
"I was misinformed."
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

del /q is the XP way. Copycmd environment variable or /y switch for copy, ditto for move.

--
--------------------------------------------------------------------------------------------------
http://webdiary.smh.com.au/archives/_comment/001075.html
=================================================
"Stan Brown" wrote in message news:MPG.1d92023834069a0998978e@news.individual.net...
> On Tue, 13 Sep 2005 22:28:02 -0700 in
> microsoft.public.windowsxp.general, dosguy favored us with...
>> For DOS scripts (.bat files), I want to turn off DOS prompting, such as for
>> the DOS command "del *" DOS comes back and asks "Are you sure (Y/N)?". I can
>> not remember the command to do this DOS prompting as it ruins a DOS script.
>> Even if I could list the available DOS commands I could remember it. Please
>> help!
>
> To list the available commands, run this
>> %systemroot%\hh.exe Ms-its:%systemroot%\help\ntcmds.chm::/ntcmds.htm
>
> But you don't want a command, you want to pass a Y answer to that Y/N
> prompt. A pipe, viz:
> echo Y | del *
> will do it.
>
> --
> Stan Brown, Oak Road Systems, Tompkins County, New York, USA
> http://OakRoadSystems.com/
> "What in heaven's name brought you to Casablanca?"
> "My health. I came to Casablanca for the waters."
> "The waters? What waters? We're in the desert."
> "I was misinformed."
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

=?Utf-8?B?ZG9zZ3V5?= wrote:
>
> For DOS scripts (.bat files), I want to turn off DOS prompting, such as for
> the DOS command "del *" DOS comes back and asks "Are you sure (Y/N)?". I can
> not remember the command to do this DOS prompting as it ruins a DOS script.
> Even if I could list the available DOS commands I could remember it. Please
> help!

As far as I recall, the /Y stands for Yes for commands that have a
Yes/No. I also use:

>NUL

after the line in a batch file to suppress any messages and/or pauses
after the command is accomplished.





--
http://www.bootdisk.com/
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

In message <43292707$0$213$bb4e3ad8@newscene.com> Plato <|@|.|> wrote:

>=?Utf-8?B?ZG9zZ3V5?= wrote:
>>
>> For DOS scripts (.bat files), I want to turn off DOS prompting, such as for
>> the DOS command "del *" DOS comes back and asks "Are you sure (Y/N)?". I can
>> not remember the command to do this DOS prompting as it ruins a DOS script.
>> Even if I could list the available DOS commands I could remember it. Please
>> help!
>
>As far as I recall, the /Y stands for Yes for commands that have a
>Yes/No. I also use:

You recall wrong, it's /Q not /Y (for DEL/ERASE, anyway):

>del /?
Deletes one or more files. DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]]
names ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names names
Specifies a list of one or more files or directories.
Wildcards may be used to delete multiple files. If a
directory is specified, all files within the directory
will be deleted. /P Prompts for confirmation before
deleting each file. /F Force deleting of read-only files.
/S Delete specified files from all subdirectories. /Q
Quiet mode, do not ask if ok to delete on global wildcard
/A Selects files to delete based on attributes attributes
R Read-only files S System files H Hidden
files A Files ready for archiving
- Prefix meaning not If Command Extensions are enabled
DEL and ERASE change as follows: The display semantics of the /S switch
are reversed in that it shows you only the files that are deleted, not
the ones it could not find.


--
Tact is the ability to describe others as they see themselves.
 
Status
Not open for further replies.