On 2013-09-21 14:37, Cesar Romani wrote:
> I'm using vim 7.4.31 on Windows 7.
> I have a file containing names of other files, say
> canción 1.txt
> canción 2.txt
> ...
> How can I apply an external command to these files. Let's say I
> want to move them to another directory, as in
> move "canción 1.txt" c:\foo\Música\
> move "canción 2.txt" c:\foo\Música\
> ...
> I think I could use something like
> :w !move <something else> c:\foo\Música\
> but I don't know what to put on <something else>

I'd transform your file into a batch script, something like

  :%s/.*/move "&" c:\\foo\\Música\\

and then run the entire thing through the command processor:

  :%w !cmd.exe

which worked for me (modulo any peculiarities of accented characters
in cmd.exe which I didn't actually test).  I regularly do the same on
Linux:

  :%s@.*@mv "&" backup/
  :%!sh

-tim


-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to