WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Miscellaneous

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Variable Substitution and Spaces in Filenames

Keywords: spaces in filenames	  

Question:

I'm using winbatch to develop a document management system on Windows 95. However, when I try to edit an existing Word for Windows file which contains spaces. It treats the letters in between the spaces as a filename. e.g. File "test 1.doc", it comes up with an error saying it cannot find "test.doc" and "1.dot" Is there a solution to this problem?

Answer:

WinBatch can handle spaces in filenames. Some applications cannot, or might need special help like double quotes around the file names.

Basically Word for Windows requires double quotes to be around long file names. Try doing it at a command prompt. It gets Word for Windows to accept the long file name, you have to put double quotes around it. Notice you need to put the percent sign % around the variable when you want to retain the quotes.

        RunZoom("c:\msoffice\%AppDir%",'"%filenam%"')

Article ID:   W13461
Filename:   Spaces in Filenames.txt
File Created: 1999:04:15:16:54:10
Last Updated: 1999:04:15:16:54:10