[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

remove space in directory name

Posted on 2005-05-14
4
Medium Priority
?
122 Views
Last Modified: 2010-04-13
i have a script(deploy.cmd) in dos windows XP; the dir path has a space

C:\Program Files\WebSphere\AppServer\java

and the script breaks after it sees the space

how can I escape the space so it takes it as a whole name
0
Comment
Question by:royalcyber
  • 2
4 Comments
 
LVL 10

Expert Comment

by:Longbow
ID: 14004014
Try this
C:\Progra~1\WebSphere\AppServer\java
Or this
"C:\Program Files\WebSphere\AppServer\java"
0
 
LVL 12

Expert Comment

by:fruhj
ID: 14004037
Longbow is right,

I will add in one more tidbit:

 The Progra~1 is the MSDOS "short name"

  If you need to know what it is for a given directory open a cmd prompt and do dir /x
  This will help you if you have a few similar long names as it might not be clear how to truncate them.

- Jack
0
 
LVL 7

Expert Comment

by:CiaranDolan
ID: 14004064
Don't truncate - always quote. Truncation is a deprecated feature which won't be around for much longer. Quoting is here to stay.
0
 
LVL 12

Accepted Solution

by:
fruhj earned 2000 total points
ID: 14004087
PS on an unrelated subject -

  If you ever need to send a link in outlook that contains a space, you can do so by starting with a < and ending with a >

  Outlook will automatically convert to a link and remove the < and >

  ex:
   Dear fred,
      the file you need is already on your computer.
     you can find it here: <c:\program files\freds program\fred.exe>

  - royalcyber

 
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Strategic internal linking is often considered an SEO power technique, especially for content marketing. Do you need to hire an SEO agency to optimize you internal linking? No, this article will help you understand the basics of internal linking and…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

865 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