https://bugs.freedesktop.org/show_bug.cgi?id=41052

           Summary: Executing batch files with spaces in their names (on
                    Windows)
           Product: LibreOffice
           Version: LibO 3.4.3 release
          Platform: Other
        OS/Version: Windows (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: BASIC
        AssignedTo: [email protected]
        ReportedBy: [email protected]


On Windows, the Shell() function does not function properly when executing
batch files with spaces in their name and when performing file redirections. 

To reproduce :

Create an example.bat in C:\Dir with Spaces with these lines :
@echo off

C:\Test\helloworld.exe > c:\test\output.txt


where helloworld.exe is an executable in C:\Test that displays the string Hello
World! to the standard output.

Then in LibreOffice, create the following macro :

Sub Test



' These ones don't work
Shell("C:\Dir with Spaces\example.bat", 4, "", True)

'Shell("C:\Dir%20with%20Spaces\example.bat", 4, "", True)

'Shell("file:///C:/Dir%20with%20Spaces/example.bat", 4, "", True)
'Shell("""C:\Dir with Spaces\example.bat""", 4, "", True)


' This one works    
'Shell("C:\Dir_with_Spaces\example.bat", 4, "", True)



End Sub


Executing the Test macro with any of the four first methods above always
produce an empty c:\Temp\output.txt file (file is created but does not contain
anything).
The last one works, when the batch file name does not contain any space.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to