Need help creating a batch file

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

vdsag

Thread Starter
Joined
Oct 2, 2008
Messages
2
Hello Guys,

I am new creating batch files and im trying to create a batch file that fixes my PC routing table while conecting to VPN, here is the details:


I got stuck while trying to using two diferent variables from diferent files in a command ex.

route add "text from file1" "test from file 2"

here is the code that i am trying to work with:

@echo off

if exist error.txt del error.txt >NUL
ipconfig | FIND "IPv4 Address. . . . . . . . . . . : 14" > ip.txt


for /f "tokens=14 delims= " %%a in (ip.txt)do call :pROCESS m=%a

:pROCESS
route delete 148.91.0.0 mask 255.255.0.0 %1

--------

What i want is to use the destination ips coming from an outside file to look something like this

route delete %1 %2

Please help
 

JohnWill

Retired Moderator
Joined
Oct 19, 2002
Messages
106,429
Please do not post multiple threads on the same issue, you already have one in Networking.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top