Solved

dos command didnt work

Posted on 2007-12-03
5
462 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now