Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I want to create a batch file using NTService.exe. My problem is like when i am passing the path like -start c:\program files\.... then it is not taking the space between "program" and "files". I want to escape this blank space. Could you tell me what is the syntax for that.
Thanks.Jargon

Your post sounds me quite confused, but to manage a path with embedded blanks you have to embrace that between double quotes, i.e.
"C:\program files\...."
Pay attention however that if you want to pass such a path to a Start command you must code the statement as below
Start "" "C:\program files\...."
hotherwise nothing works.

Batch files go by the old DOS way of naming files and directories. If the name of a file or directory in windows is more than 8 letters long, DOS calls it by the first 6 letters followed by ~1.
For example, spectacular.txt would be called specta~1.txt in DOS. If there are 2 files, one called spectacular.txt and one called spectaculars.txt, spectacular.txt would be called specta~1.txt and spectaculars.txt would be called specta~2.txt.
So the directory Program Files is called progra~1 in a batch file.
Hope this helps,
-Trent
Compaq Presario 5365
AMD K6-2 450 Mhz
256 MB RAM
Dual-booting Windows 98 SE and SimplyMepis 3.4RedHat 9 worked fine without problems.

Sorry, but batch scripts under NT kernel systems (NT/2K/XP)can manage LFN paths and names without problems as the interpreter is cmd.exe NOT command.com.
What you say applies to legacy programs only, those developed as 16 bits applications and managed by NTVDM subsystem.
So no need of short format translation usually.

OK, sorry.
Compaq Presario 5365
AMD K6-2 450 Mhz
256 MB RAM
Dual-booting Windows 98 SE and SimplyMepis 3.4RedHat 9 worked fine without problems.

![]() |
batch to extract string b...
|
Dos Batch File Backup
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |