Tim Chase wrote:
for %a in (*.txt) do [command using %a]
instead of
for %%a in (*.txt) do [command using %%a]
Then again, maybe I'm among the freakish few that actually use
for-loops at the dos-prompt. :)
-tim
I have used them too, starting (in my case) with Dos 3.1. Your warning
for %a in (*.txt) do [command using %a]
instead of
for %%a in (*.txt) do [command using %%a]
Then again, maybe I'm among the freakish few that actually use for-loops
at the dos-prompt. :)
-tim
I have used them too, starting (in my case) with Dos 3.1. Your warning
is valid on old D
Tim Chase wrote:
To do an operation on multiple files in a WinXP DOS batch:
for %%A in (*.txt) do [command]
Just a small caveat to the reader, this works within a batch file by
escaping the variable ("%A" in this case). If you're running it from
the command-line, you don't escape it, and
Nikolaos A. Patsopoulos wrote:
Yakov Lerner wrote:
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote:
> On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> Yakov Lerner wrote:
>> > On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> >>
Is this what you want for #3?
---
$ mkdir 1 2
$ >1/a
$ >1/b
$ >2/c
$ >2/d
]$ tree
.
|-- 1
| |-- a
| `-- b
`-- 2
|-- c
`-- d
2 directories, 4 files
$ for file in $(find . -type f); do dir=$(dirname "${file}"); mv "${file}"
"${dir}/$(basename "${dir}"_$(basename "${file}"))"; done
$ t
Sibin P. Thomas wrote:
If u have Cygwin then creating a batch file with the following would be the
simplest solution -
set TARGETDIR=C:\something
set SCRIPTDIR=C:\something_else
find %TARGETDIR% -name "*.[ch]" -exec gvim -s %SCRIPTDIR%\win32_vimscript.vim
"{}" ";"
Basically use "find" to help u
If u have Cygwin then creating a batch file with the following would be the
simplest solution -
set TARGETDIR=C:\something
set SCRIPTDIR=C:\something_else
find %TARGETDIR% -name "*.[ch]" -exec gvim -s %SCRIPTDIR%\win32_vimscript.vim
"{}" ";"
Basically use "find" to help u (actually it's just one
To do an operation on multiple files in a WinXP DOS batch:
for %%A in (*.txt) do [command]
Just a small caveat to the reader, this works within a batch file
by escaping the variable ("%A" in this case). If you're running
it from the command-line, you don't escape it, and thus use
Steve Hall wrote:
On Thu, 2006-09-14 at 13:01 +0300, Nikolaos A. Patsopoulos wrote:
1. I want to edit multiple files from command line so I created a
vim script with all the commands (>20). I use a batch file in WinXP:
|@echo off
vim -s script file.txt
exit
however I need to run this
On Thu, 2006-09-14 at 13:01 +0300, Nikolaos A. Patsopoulos wrote:
>
> 1. I want to edit multiple files from command line so I created a
> vim script with all the commands (>20). I use a batch file in WinXP:
>
> |@echo off
> vim -s script file.txt
> exit
>
> however I need to run this script o
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote> Yakov
Lerner wrote:
> On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> Yakov Lerner wrote:
>> > On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> >> Yakov Lerner wrote:
>> >> > On 9/14/06, Nikolaos A.
Yakov Lerner wrote:
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote:
> On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> 3. This is not Vim related but I wonder if anyone knows sth. I have
>> the following structure of folders and files:
>>
>> ..
Yakov Lerner wrote:
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote:
> On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> Yakov Lerner wrote:
>> > On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> >> 2.Can I delete after a pattern
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote:
> On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> 3. This is not Vim related but I wonder if anyone knows sth. I have
>> the following structure of folders and files:
>>
>> ..
>> folder1
>>
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote:
> On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> Yakov Lerner wrote:
>> > On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> >> 2.Can I delete after a pattern search? Sth like this
Yakov Lerner wrote:
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
3. This is not Vim related but I wonder if anyone knows sth. I have
the following structure of folders and files:
..
folder1
file1
file2
folder2
file1
file2
.
and want to ad
Yakov Lerner wrote:
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote:
> On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> 2.Can I delete after a pattern search? Sth like this:
>>
>> :/^: /-3d
>>
>> and how can I repeat this globally?
>
> :g/^: /.-
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote:
> On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
>> 2.Can I delete after a pattern search? Sth like this:
>>
>> :/^: /-3d
>>
>> and how can I repeat this globally?
>
> :g/^: /.-3d
>
> Yakov
>
>
I ge
Yakov Lerner wrote:
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
2.Can I delete after a pattern search? Sth like this:
:/^: /-3d
and how can I repeat this globally?
:g/^: /.-3d
Yakov
I get an E16: invalid range error
--
Nikolaos A. Patsopoulos, MD
Department of Hygiene
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
3. This is not Vim related but I wonder if anyone knows sth. I have the
following structure of folders and files:
..
folder1
file1
file2
folder2
file1
file2
.
and want to add the folder name int
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
2.Can I delete after a pattern search? Sth like this:
:/^: /-3d
and how can I repeat this globally?
:g/^: /.-3d
Yakov
On 9/14/06, Nikolaos A. Patsopoulos <[EMAIL PROTECTED]> wrote:
Hi,
I have a series of questions:
1. I want to edit multiple files from command line so I created a vim
script with all the commands (>20). I use a batch file in WinXP:
|@echo off
vim -s script file.txt
exit
however I need to ru
22 matches
Mail list logo