Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

dos command didnt work

Posted on 2007-12-03
5
Medium Priority
?
468 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 85

Assisted Solution

by:oBdA
oBdA earned 2000 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 85

Accepted Solution

by:
oBdA earned 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
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 will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

715 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