Topic: Problem with File_Open() and Long Filenames (1 of 2), Read 36 times
Conf: VEDIT Macro Language Support
From: Mark Novembrino
Date: Thursday, April 14, 2005 05:14 PM


I am doing the following command to get a directory and dump it into a buffer:

Out_Ins() Dir("*.xml",NOMSG+SUPPRESS) Out_Ins(CLEAR)

I'm then copying each filename using Reg_Copy_Block and opening the file using File_Open(@r).

This works fine for all files except for those that have spaces in the filename. For files that have spaces in the filename, the File_Open(@r) command does not work.

 


Topic: Re: Problem with File_Open() and Long Filenames (2 of 2), Read 36 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Thursday, April 14, 2005 05:26 PM

At 05:14 PM 4/14/2005, you wrote:
>This works fine for all files except for those that have spaces in the filename. For files that have spaces in the filename, the File_Open(@r) command does not work.

Yes, you need this syntax: File_Open("|@(r)")

The reason is that since the File_Open() supports options such as "-a",
it needs literal spaces within double-quotes.

Ted.