Solved

dos command didnt work

Posted on 2007-12-03
5
463 Views
Last Modified: 2008-02-26
Hi,
I'm trying to access this folder but it didn't work, so how will the folder name in DOS??



C:\Documents and Settings\bilbo>dir C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\
The system cannot find the file specified.

C:\Documents and Settings\bilbo>
0
Comment
Question by:motioneye
  • 2
  • 2
5 Comments
 
LVL 19

Expert Comment

by:Limbeck
ID: 20394453
try something like

dir C:\Progra~1\Micros~1\MSSQL.1\MSSQL\Backup\
 
0
 
LVL 83

Assisted Solution

by:oBdA
oBdA earned 500 total points
ID: 20394547
Whenever you need to specify a path containing spaces in a command line, you need to enclose it in quotes:
dir "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup"
If you want to use short names, you can retrieve these with a "dir /x".

Limbeck,
the short name of a folder or a file is *not* necessarily "<First 6 letters>~1"!
If Microsoft Office (or anything else creating a folder starting with "Microsoft" has been installed first, then this will already have used ~1, with the SQL installation then being ~2 or whatever.
So these paths are valid *only* for the one single machine on which you tested it, they can *not* be used on another machine!
0
 
LVL 2

Expert Comment

by:Dominik_L
ID: 20394581
DOS folder name is limited to the 8-characters. If the name is longer than 8 characters or have spaces in the name than name is 6 characters of the name and usually "~1" (sometimes "~2" and so on) on the end with spaces cutted out.
It will be easier to download Dos Navigator: http://www.ritlabs.com/download/dn/dn151.zip
(its a free file manager for DOS, but works under windows).
Unzip files where you want and run DN.COM.
You will see folders in a 8-characters way with "~" and you will be able to see the name of every folder.
0
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 20394617
Dominik_L,
the path in question here is for an SQL server, SQL server doesn't run on DOS, so this question is obviously not about DOS, but about the NT command shell, usually mislabeled as "DOS Box" (though it has nothing at all to do with plain DOS, except that they look alike).
Running 16 bit DOS programs like the one you're recommending is not a good idea on any 32bit Windows installation, because the DOS emulation uses way too many resources. Open a command window, type "edit" and type something; you'll see the CPU going berserk - just to work on a few characters.
0
 
LVL 2

Expert Comment

by:Dominik_L
ID: 20401604
oBdA,
you're right, but I still think that its not a problem to run Dos Navigator for 1 minute to get the correct short names of folders on the searched path. Sometimes it's very usefull.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question