Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Batch file - Executing - in Drive E: - The system cannot find the path specified

Avatar of LindaC
LindaCFlag for Puerto Rico asked on
Storage SoftwareWindows BatchVB Script
13 Comments1 Solution1061 ViewsLast Modified:
I have the following program, but it is failing because it cannot find the path specified.
It is something with being executing from drive E:

set newDate=%date:~4,2%-%date:~7,2%-%date:~10%
set arg=OEM10G
set WorkingDirectory=C:\Program Files\Veritas\NetBackup\bin
set Logs=E:\oracle\Dba\logs\hot_backup_logs\hot_backup_logs
set Scripts=E:\oracle\Dba\scripts\hot_backup_scripts
Set History=E:\oracle\Dba\logs\historial
set LogFile=%Logs%\logfile.txt
set VerifyFile=%Logs%\Verificacion.log
set BorrameFile=%Logs%\borrame.txt
set HistoryFile=%History%\OEM10G_hotbackup_HISTORIAL.log
set Server=OEM10G
set Today=%Date:~4,2%-%Date:~7,2%-%Date:~10%
set Policy=Windows-Servers-dbs
set LogFile=%Logs%\OEM10G_Hotback.%Today%.log
set FileList=%Scripts%\OEM10Glist.txt
e:
start E:\oracle\Dba\scripts\hot_backup_scripts\hot_OEM10G_backup.bat

C:
cd "C:\Program Files\Veritas\NetBackup\bin"
start bpbackup -p Windows-Servers-dbs -s %arg% -L E:\oracle\Dba\logs\hot_backup_logs\%arg%_Hotback.%newDate%.log -f E:\oracle\Dba\scripts\hot_backup_scripts\%arg%list.txt
e:
goto :Queued

:Queued
   e:
   call %Scripts%\WAIT.bat 5
   (  tasklist /fi "IMAGENAME eq bpbkar32.exe"
      tasklist /fi "IMAGENAME eq bpcd.exe"
   )>%BorrameFile%

  findstr /i /s "bpbkar32.exe bpcd.exe" %BorrameFile%

  if %errorlevel% equ 1 (
      echo Veritas lo puso en Queued>%VerifyFile%
      echo error level is %errorlevel%>>%LogFile%
      goto :Queued
   ) else (
      e:
      goto :Loop
     )
     

:Loop
        e:
      call E:\oracle\Dba\scripts\hot_backup_scripts\WAIT.bat 10
      tasklist.exe /fi "IMAGENAME eq bpbkar32.exe">E:\oracle\Dba\logs\hot_backup_logs\borrame.txt
      tasklist.exe /fi "IMAGENAME eq bpcd.exe">>E:\oracle\Dba\logs\hot_backup_logs\borrame.txt
      findstr /i /s "bpbkar32.exe bpcd.exe" E:\oracle\Dba\logs\hot_backup_logs\borrame.txt
      if %errorlevel% equ 0 (
            echo Todavía está corriendo el envío a Veritas > E:\oracle\Dba\logs\hot_backup_logs\Verificacion.log
            echo error level is %errorlevel% >>E:\oracle\Dba\logs\hot_backup_logs\logfile.txt
            Goto :Loop
       ) else (
            echo Terminó el envio a Veritas >> E:\oracle\Dba\logs\hot_backup_logs\Verificacion.log
            echo error level is %errorlevel% >>E:\oracle\Dba\logs\hot_backup_logs\logfile.txt
            start E:\oracle\Dba\scripts\hot_backup_scripts\hot_OEM10G_backup_end.bat
            Goto :Terminar
      )

:Terminar
      e:
      type E:\oracle\Dba\logs\hot_backup_logs\%arg%_Hotback.%newDate%.log >> E:\oracle\Dba\logs\hot_backup_logs\hot_OEM10G.%newDate%.log
      type  E:\oracle\Dba\logs\hot_backup_logs\%arg%_Hotback.%newDate%.log >> E:\oracle\Dba\logs\historial\OEM10G_hotbackup_HISTORIAL.log  
      ECHO Y | DEL E:\oracle\Dba\logs\hot_backup_logs\%arg%_Hotback.%newDate%.log
      findstr /C:"ORA-" E:\oracle\Dba\logs\hot_backup_logs\hot_OEM10G.%newDate%.log
      if %errorlevel% equ 0 (
            cscript E:\oracle\Dba\scripts\hot_backup_scripts\sent_log.vbs
      ) else (
            findstr /C:"status = 0" E:\oracle\Dba\logs\hot_backup_logs\hot_OEM10G.%newDate%.log
            if %errorlevel% neq 0 (
                  cscript E:\oracle\Dba\scripts\hot_backup_scripts\sent_log.vbs
      )
      
      exit;

ASKER CERTIFIED SOLUTION
Avatar of Steve Knight
Steve KnightFlag of United Kingdom of Great Britain and Northern Ireland imageIT Consultancy

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 13 Comments.
See Answers