2009/11/18 epanda <[email protected]>:
>
> 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
You probably need to escape the % in some way (Windows uses % for
environment variable expansion I believe). Perhaps it would be worth
trying %% or something like that (I don't use batch scripting). It's
passing expand(':p:h') instead of expand('%:p:h').
Al
--
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
-~----------~----~----~----~------~----~------~--~---