[Gambas-user] Shell command not working

Jesus ea7dfh at ...2382...
Thu Mar 7 21:06:34 CET 2013


El 07/03/13 13:40, Jose Monteiro escribió:
> text = "cd ~/.relat_bact && rm -rf Modelo*.odt && zip -r " & "MA" & Mid$(ListBox1.Text, 1, 9) & ".odt  ."
>    Shell text Wait
>
> 1 - navigating to ~/.relat_bact directory and deleting the odt file is working fine.
>
> 2 - generating the "zipped" odt file (MAxxxx.odt) using the files and directories inside ~/.relat_bact is not working. The error message is: "zip I/O error: No such file or directory
> zip error: Could not create output file (MA000004/12.odt)"
>
> 3 - If I type these commands directly on a terminal it works fine.

>
> Thanks in advance

There is an extra slash "/" in your final string. Check that in the Mid 
function. BUT...

Why do you use shell command? Gambas have its own commands to do what 
you want. See "working with files" in the manual wiki and the 
gb.compress component.

Regards

-- 
Jesus Guardon




More information about the User mailing list