While this command works on win cmd prompt, it fails from a batch :
vim -c "source C:\Documents and Settings\user\Mes documents\util
\myScript.vim" -c "argdo call TangoTemplateNb1()" -c "exec 'saveas ' .
expand('%:p:h') . '\newFile.txt'" -c q exportSql.xml
"Documents and Settings\user\Mes documents\util\exportSql.xml" [unix]
112L, 7982C
":p:h\newFile.txt"
Erreur détectée en traitant command line :
":p:h\newFile.txt" E212: Impossible d'ouvrir le fichier pour y écrire
On 18 nov, 12:00, "A. S. Budden" <[email protected]> wrote:
> Probably something like this (untested: sorry!):
>
> vim -c "source myScript.vim" -c "argdo call MyFunc()" -c "saveas
> newName.txt" aFile
>
> or:
>
> vim -c "source myScript.vim" -c "argdo call MyFunc()" -c "exec 'saveas
> new_' . expand('%:t')" aFile
>
> Al
>
> 2009/11/18 epanda <[email protected]>:
>
>
>
> > Hi,
>
> > I am launching this vim command to edit an existing file and wanna
> > save it under another filename.
>
> > vim -c "source myScript.vim" -c "argdo call myFunc()" aFile -
> > c ?????????
>
> > How can I do ?
> > Thanks
>
> --http://sites.google.com/site/abudden
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---