Solved

dos command didnt work

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

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 84

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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