• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Correct Syntax for XP Command line

Basie

Senior member
I was trying to delete a shortcut from the desktop using the XP command line. Had no luck
Kept saying that it couldnt find the file or folder. What is the correct syntax for Del. ?
Do you have to type the complete path. ie. C:\documents and settings\name\desktop\shortcut name. ? I was playing with different configurations of that
but nothing worked. Linux I had to learn the command line but not XP. Basically lazy.
 
at the command prompt, it seems shortcuts are either hidden, or they are not able to be accessed by using command prompt tools..unless someone knows some other tricks..

Here is all the DEL syntax and help:

Deletes one or more files.

DEL [/P] [/F] [/S] [/quote] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/quote] [/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.
 
Thanks. What I found out was that I was able to go into the Shortcuts Folder on the Desktop and using
the syntax C:\Doc and Settings\Name\Desktop\Shortcuts😀el shortcut name.lnk That worked if the
name was just one word. I guess I have too much time on my hands. Lol.
 
When specifying long file paths as a command parameter, you generally have two options:

1. Enclose the file path in quotes (e.g. del "C:\Document and Settings\Username\Desktop\Shortcut.lnk")

2. Use the 8.3 equivalents for long file or folder names that contain spaces (usually the first 6 letters + "~1") (e.g. del C:\DOCUME~1\Username\Desktop\Shortcut.lnk)
 
While I'm beating this horse to death, I found out that if you enclose the shortcut names with more than
two words and spaces in quotes you can delete them also from the command line.
ie: C:\Doc and Settings\Name\Desktop\del "my shortcut". New stuff for me. I'm not very fond of the
command line though using it in Linux I learned it's potential.
 
Tab completion should add the necessary quotes for you. Just type the first few letters of the name and tab until you find it. And then stop using spaces in file names 😉
 
Back
Top