English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm trying to run a program in command prompt on windows, and it is giving me the error message "The syntax of the command is incorrect." The syntax looks correct. Anyone have any suggestions on how to fix this?

2007-01-22 08:28:46 · 9 answers · asked by mmwreal 2 in Computers & Internet Programming & Design

SDelete Usage

SDelete is a command line utility that takes a number of options. In any given use, it allows you to delete one or more files and/or directories, or to cleanse the free space on a logical disk. SDelete accepts wild card characters as part of the directory or file specifier.

Usage: sdelete [-p passes] [-s] [-q]
sdelete [-p passes] -z [drive letter]

-p passes

Specifies number of overwrite passes

-s

Recurse subdirectories

-q

Don't print errors (quiet)

-z

Cleanse free space

2007-01-22 08:34:13 · update #1

So I'm in the directory where the .exe file is located and I type "sdelete " exactly of course without the "" and it gives me that error message.

2007-01-22 08:37:45 · update #2

I guess what I'm wondering is do I have to inclue the brackets like the [ ] or the < >, and since this is a stand alone program and is not included in the dos system, do I just run it from its directory, or do I need to put it in a special place first?

2007-01-22 08:44:28 · update #3

I tried the command "sdelete C:\Temp -p 10" and now I got the message after it looks like the program ran "Delete is set for 10 passes. No files that match 10". What could this mean, and it looks like it didn't delete any files in my temp folder.

2007-01-22 08:53:52 · update #4

I finally got it to work. Thanks Bamba for the suggestion. I didn't know I had to use " " around the file if there was spaces in the file name. Thanks everyone for the suggestions.

2007-01-22 09:03:03 · update #5

9 answers

I've just tried it and it works fine. The only thing I can think of is if the directory path to the file you're trying to deleting has spaces in it somewhere e.g.

C:\Program Files\test.txt

If that's the case then you must enclose the file path in quotes so, if you wanted to delete the above the full command would be:

sdelete "C:\Program Files\test.txt"

2007-01-22 08:55:04 · answer #1 · answered by Bamba 5 · 0 0

If the message says that the syntax is not correct then it is not and you are not typing the command properly.

Here are some guidelines for commands:

For going in to a partition type: c:\ and press enter.
For going into a folder type: cd foldername which should be in the correct partition.
For executing a file type: install.exe
Remember to enter the extension of the file if that is what you are trying to do as the system would run files if the extension is there.

For more commandsgo to:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true

2007-01-22 08:37:51 · answer #2 · answered by Anonymous · 0 0

Not without seeing the command you are trying to run, or telling us what you were trying to accomplish in the DOS prompt.

Usually you will be at the C:\ prompt. You can type in HELP and press ENTER to see a list of commands. You can type in HELP [Command] and get help for that command.

If the instructions you have are for a game or software, they should tell you the exact command they want you to type in and usually give an example. Sometimes it is not even a command, but rather the name of the program that you need to run.

2007-01-22 08:41:15 · answer #3 · answered by SteveN 7 · 0 0

try sdelete C:\temp -p 10
this would delete the temp dir of C:\ overwritten 10 times. don't put brackets or <> symbols when typing it in. you have to use hyphens though for parameters

2007-01-22 08:39:22 · answer #4 · answered by GuitarJammer 5 · 0 0

open prompt

go the folder where the file is

type in the name of the file with extension , hit enter

and that should run the file.

lemme know if this works.

2007-01-22 08:49:26 · answer #5 · answered by markfuno 1 · 0 0

How about posting what you're trying to do?

Usually commands have explanations if you type the command followed by a space then /?

As in: dir /?

2007-01-22 08:32:20 · answer #6 · answered by Colin M 3 · 1 0

Post the syntax so we can tell.

2007-01-22 08:31:53 · answer #7 · answered by Anonymous · 0 0

check the old DOS syntax...could help you.

2007-01-22 08:32:25 · answer #8 · answered by Anonymous · 0 0

append this: "> file.txt" so for example: "dir /S C: >file.txt"

2016-05-23 22:31:11 · answer #9 · answered by ? 4 · 0 0

fedest.com, questions and answers