[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

03/13/2007 at 04:57AM PDT, ID: 22445691
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.8

Batch file problem.

Asked by SystmProg in Windows Batch Scripting, MS DOS

Tags: batch, file

@echo off

@echo  =====================================================================
@Echo  Script to Copy DST patch on all servers from D:\DSTMain\Remove folder
@echo  =====================================================================

@echo Please Enter Server List Path (e.i. D:\DSTMain\Srvlist\mgmsrv.txt)

set /P srvlist=" "

IF exist %srvlist% (
  Echo Server list found: %srvlist%
  Echo Processing all the servers from %srvlist%
  CLS

) ELSE (
  CLS
  Echo Server list NOT found: %srvlist%
  Echo Exiting...
  goto:EOF

)

IF exist D:\DSTMAIN\HostsAlive.txt Del D:\dstmain\HostsAlive.txt
IF exist D:\DSTMAIN\HostsDown.txt Del D:\dstmain\HostsDown.txt

FOR /F "TOKENS=*" %%a IN (%srvlist%) DO CALL:DONOW "%%a"

:DONOW

SET srvname=%~1

CLS

Echo 1.Processing Server: %srvname%
Echo 2.Checking Connectivity...............

IF exist D:\DSTMAIN\pingresult.txt Del D:\dstmain\pingresult.txt

Ping -n 1 %srvname% > PingResult.txt 2>&1

SET PingSrv=""

FOR /F "TOKENS=1,2" %%c IN ('FIND /i "Reply From" PingResult.txt') DO SET PingSrv="%%c %%d"

@ echo %PingSrv%
@ echo "%%c %%d"

PAUSE
PAUSE
PAUSE

IF "%PingSrv" == "Reply From" (

  Echo 3.Reply received from Host %srvname%
  Echo %srvname% >> HostsAlive.txt
 
  REM This is to check wether currently logged in user have access or not.

  IF exist D:\DSTMain\Access.txt Del D:\DSTMain\Access.txt

  IF exist D:\DSTMain\NoAccess.txt Del D:\DSTMain\NoAccess.txt

  Echo 4.Checking Access for Currently Logged on user on Server: %srvname%

  DIR \\%srvname%\C$ > Access.txt 2>&1

  FOR /F "TOKENS=1,2" %%h IN ('find /i "Logon failure:" ^< access.txt') Do SET FPA="%%h %%i"
 
  IF /i "%FPA%" == "Logon failure:" (

     Echo 5.Currently Logged in user DON'T have access to copy DST Folder.

     Echo No access to Server: %srvname% >> NoAccess.txt
     PAUSE

  ) ELSE (

     REM ******** START NOW ******
   
     Echo 5.Currently Logged in user have access to copy DST Folder.
     Echo 6.Copying DST Removal folder to server: %srvname%.

     MD \\%srvname%\c$\DSTRemove > DSTFolder.txt 2>&1

     FIND /i "A subdirectory or file" < DSTFolder.txt > DSTFolderTest.txt 2>&1

     IF "%errorlevel%" == "0" (
                  
        Copy D:\DSTMain\Remove\*.* \\%srvname%\c$\DSTRemove > DSTFiles.txt 2>&1
        Echo 7.DSTRemove folder was copied successfully on server %srvname%
        Echo DSTRemove Folder copied on server: %srvname% >> Success.txt
 
     ) ELSE (

        Echo DST Folder already Exist for server: %srvname% >> DSTAlready.txt
     )
      
   )

) ELSE (
 
  Echo %srvname% >> HostsDown.txt
  Echo 3.Reply NOT received from Host %srvname%

)

:eof





I'm running above batch file to copy DSTFolder to our all servers. However, I'm getting error message:

The message I get:

1. Processing Server Server_name.
2. Checking Connectivity......
ACCESS.TXT"" was unexpected at this time.

Is there any way to read a word from a Text file using any other command or method except FOR /F loop?
[+][-]03/13/07 05:00 AM, ID: 18709299

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 05:09 AM, ID: 18709340

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/13/07 05:20 AM, ID: 18709383

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 05:21 AM, ID: 18709390

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 05:25 AM, ID: 18709417

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 05:30 AM, ID: 18709451

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03/13/07 06:31 AM, ID: 18709933

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 06:32 AM, ID: 18709949

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 06:34 AM, ID: 18709974

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/13/07 06:40 AM, ID: 18710015

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 06:41 AM, ID: 18710025

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 06:44 AM, ID: 18710057

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 06:46 AM, ID: 18710065

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/13/07 06:52 AM, ID: 18710128

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 06:54 AM, ID: 18710146

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 07:04 AM, ID: 18710256

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 07:06 AM, ID: 18710276

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Windows Batch Scripting, MS DOS
Tags: batch, file
Sign Up Now!
Solution Provided By: SteveGTR
Participating Experts: 3
Solution Grade: A
 
 
[+][-]03/13/07 07:11 AM, ID: 18710336

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 07:14 AM, ID: 18710354

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/13/07 07:17 AM, ID: 18710394

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 07:21 AM, ID: 18710429

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 07:31 AM, ID: 18710501

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/13/07 07:33 AM, ID: 18710522

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/13/07 07:35 AM, ID: 18710540

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/13/07 08:49 AM, ID: 18711259

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 09:05 AM, ID: 18711427

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 09:40 AM, ID: 18711816

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 10:14 AM, ID: 18712098

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 10:17 AM, ID: 18712128

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 10:44 AM, ID: 18712351

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/13/07 10:54 AM, ID: 18712435

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/13/07 08:08 PM, ID: 18715753

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 08:31 PM, ID: 18715892

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/13/07 10:22 PM, ID: 18716241

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 11:09 PM, ID: 18716375

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 11:15 PM, ID: 18716398

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/13/07 11:39 PM, ID: 18716479

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/14/07 12:24 AM, ID: 18716642

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/14/07 05:43 AM, ID: 18717809

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/14/07 05:52 AM, ID: 18717867

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/14/07 06:47 AM, ID: 18718276

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/14/07 08:04 AM, ID: 18718961

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/14/07 08:06 AM, ID: 18718976

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/14/07 08:16 AM, ID: 18719066

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/14/07 08:16 AM, ID: 18719076

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/14/07 08:22 AM, ID: 18719132

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/14/07 08:31 AM, ID: 18719228

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91