kcmjr | 1 Oct 06:22 2006

Re: Running Netsh in a bat file

My suspicion is that you do not have the firewall component installed, but that's just a guess since I cannot
see the system in person.  All the references I've been able to find state that that error is due to the
appropriate NETSH context not being available.

See these links as examples...
http://www.microsoft.com/technet/itsolutions/network/security/ipv6fw/unetsh01.mspx
http://www.microsoft.com/downloads/details.aspx?FamilyID=4454e0e1-61fa-447a-bdcd-499f73a637d1&DisplayLang=en
http://www.chicagotech.net/netsh.htm
http://forum.oscr.arizona.edu/archive/index.php/t-2284.html

Good luck
Ken Mazie

--- In batchworld@..., "Gary Kuznitz" <docfxit <at> ...> wrote:
>
> I have a bat file with the following command:
> netsh firewall add portopening TCP 5900 UltraVNCTCP5900 enable all
> 
> I'm getting an error saying:
> The following command was not found: firewall add portopening TCP 5900 
> UltraVNCTCP5900 enable all.
> 
> Does anyone know how to fix it?  
> 
> Thank you,
> 
> Gary Kuznitz
>

To Post a message, send it to:   batchworld@...
(Continue reading)

gfunk99999 | 12 Oct 09:42 2006
Picon

How to get findstr avoid these characters < >


Hi All, Mic Long time no see,

Does anyone know how to get findstr avoid these characters (greater and
lesser sign)          <    >  inside a text file? In a batch I just use
^ but in a text file I can't figure it out.   After execution I get this
error "The system cannot find the file specified."  If I remove the <  >
characters the code executes without problems.

Code:

for /f "delims=" %%a in ('findstr /r /c:"Downloads" %temp%\summary.txt')
do set download=%%a
echo %download%

summary.txt - Notepad
  Volume in drive C is IBM_PRELOAD
  Volume Serial Number is B4EE-2A1B

  Directory of C:\Documents and Settings\All Users\Application Data\Net

10/10/2006  12:58 PM    <DIR>          .
10/10/2006  12:58 PM    <DIR>          ..
10/10/2006  04:19 PM    <DIR>          Downloads
10/10/2006  12:59 PM    <DIR>          Logging
10/10/2006  04:20 PM    <DIR>          Storage
                0 File(s)              0 bytes
                5 Dir(s)  13,590,061,056 bytes free

[Non-text portions of this message have been removed]
(Continue reading)

Marc Peterson | 12 Oct 17:50 2006
Picon
Picon

RE: How to get findstr avoid these characters < >

When I run this, the variable %download% is being set correctly and the
error occurs with the ECHO command.  I don't know if this will cause
problems in your application, but one way around this is to use:
echo "%download%
or
echo "%download%"

Marc

> -----Original Message-----
> From: batchworld@... 
> [mailto:batchworld@...] On Behalf Of gfunk99999
> Sent: Thursday, October 12, 2006 2:43 AM
> To: batchworld@...
> Subject: [BATCH WORLD] How to get findstr avoid these characters < >
> 
> 
> Hi All, Mic Long time no see,
> 
> Does anyone know how to get findstr avoid these characters 
> (greater and
> lesser sign)          <    >  inside a text file? In a batch 
> I just use
> ^ but in a text file I can't figure it out.   After execution 
> I get this
> error "The system cannot find the file specified."  If I 
> remove the <  >
> characters the code executes without problems.
> 
> Code:
(Continue reading)

gfunk99999 | 12 Oct 22:05 2006
Picon

Re: How to get findstr avoid these characters < >

echo "%download% worked.  Thank you! Man O Man one simple quote... 
LOL

--- In batchworld@..., "Marc Peterson" 
<marc.peterson <at> ...> wrote:
>
> When I run this, the variable %download% is being set correctly 
and the
> error occurs with the ECHO command.  I don't know if this will 
cause
> problems in your application, but one way around this is to use:
> echo "%download%
> or
> echo "%download%"
> 
> Marc
> 
> > -----Original Message-----
> > From: batchworld@... 
> > [mailto:batchworld@...] On Behalf Of gfunk99999
> > Sent: Thursday, October 12, 2006 2:43 AM
> > To: batchworld@...
> > Subject: [BATCH WORLD] How to get findstr avoid these characters 
< >
> > 
> > 
> > Hi All, Mic Long time no see,
> > 
> > Does anyone know how to get findstr avoid these characters 
> > (greater and
(Continue reading)

Garry Deane | 13 Oct 02:56 2006
Picon

Re: How to get findstr avoid these characters < >

--- In batchworld@..., "gfunk99999" <gfunk99999 <at> ...> 
wrote:
>
> 
> Hi All, Mic Long time no see,
> 
> Does anyone know how to get findstr avoid these characters
> (greater and lesser sign) < > inside a text file? In a batch
> I just use ^ but in a text file I can't figure it out.   After
> execution I get this error "The system cannot find the file
> specified."  If I remove the <  >
> characters the code executes without problems.
> 
> Code:
> 
> for /f "delims=" %%a in (
> 'findstr /r /c:"Downloads" %temp%\summary.txt')
> do set download=%%a
> echo %download%
> 
> summary.txt - Notepad
>   Volume in drive C is IBM_PRELOAD
>   Volume Serial Number is B4EE-2A1B
> 
>   Directory of C:\Documents and Settings\All Users\Application 
Data\Net
> 
> 10/10/2006  12:58 PM    <DIR>          .
> 10/10/2006  12:58 PM    <DIR>          ..
> 10/10/2006  04:19 PM    <DIR>          Downloads
(Continue reading)

foxidrive | 13 Oct 05:17 2006
Picon

Re: How to get findstr avoid these characters < >

On Thu, 12 Oct 2006 07:42:49 -0000, gfunk99999 wrote:

> Hi All, Mic Long time no see,

Glad to see you got a solution.  I'm not sure you'll see this as it appears
that I am being moderated...

-- 
Regards,
Mic

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@... 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/batchworld/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/batchworld/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:batchworld-digest@... 
    mailto:batchworld-fullfeatured@...
(Continue reading)

celtic111 | 9 Oct 22:55 2006
Picon

Copy batch file

Hi,
I am trying to create a batch file that will go to one text file and 
pull a line then compare it another file and based on the line 
matching copy a file to another directory see my example.

Text file #1 

ABC000001

text File #2

ABC000001^\\filepath\00001.msg

This would copy 00001.msg to a new directory.

Thanks for your help in advance.

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@... 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/batchworld/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
(Continue reading)

foxidrive | 16 Oct 04:46 2006
Picon

Re: Copy batch file

On Mon, 09 Oct 2006 20:55:01 -0000, celtic111 wrote:

> Hi,
> I am trying to create a batch file that will go to one text file and 
> pull a line then compare it another file and based on the line 
> matching copy a file to another directory see my example.
> 
> Text file #1 
> 
> ABC000001
> 
> text File #2
> 
> ABC000001^\\filepath\00001.msg
> 
> This would copy 00001.msg to a new directory.
> 
> Thanks for your help in advance.

Can you give a little more explanation? 

It's a little unclear as your two files above don't match 
- and is the ^ a typo?

--

-- 
Regards,
Mic

To Post a message, send it to:   batchworld@...

(Continue reading)

vadi raj | 17 Oct 01:41 2006
Picon

Problem in shell script

Respected Sir/Madam,

I want to write shell script to delete files based on file creation datetime. If a file or folder is 30 minutes
old then it should delete.

It shouldn't delete viewedit folder.

Example 
I have a folder /temp/temp_files under this we have viewedit folder[/temp/temp_files/viewedit] and
also so many different folders and file will be there. [Folder and files will be generated by application]
Now except viewedit folder I need to delete all file and folder form /temp/temp_files this location if it is
30 minutes old.

By using find command I am facing lot of problem 
i have used like this
find /temp/temp_files/* ! \( -name viewedit -prune \) -a \( -mmin +30 \) -exec rm -rf {}  \;

Please can any one help me in this..it will be great helpful for me.

I will wait for the response

Thanks and regards
Vadiraj

 		
---------------------------------
 All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

[Non-text portions of this message have been removed]

(Continue reading)

foxidrive | 17 Oct 07:33 2006
Picon

Re: Problem in shell script

On Mon, 16 Oct 2006 16:41:13 -0700 (PDT), vadi raj wrote:

> I want to write shell script to delete files based on file creation
> datetime. If a file or folder is 30 minutes old then it should delete. 
> 
> It shouldn't delete viewedit folder.

Can you keep only a certain number of files, instead?
For example keep the 10 newest files in the viewedit folder - that is far
easier to code.

 <at> echo off
for /f "skip=10 delims=" %%a in ('dir *.* /b /o-d /a-d') do del "%%a"

And to keep only the 10 newest folders:

 <at> echo off
for /f "skip=10 delims=" %%a in ('dir *.* /b /o-d /ad') do rd /s /q "%%a"

Both code snippets are untested, and would require NT or later.

--

-- 
Regards,
Mic

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@... 
Yahoo! Groups Links
(Continue reading)


Gmane