[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

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

Posted on 2010-03-28
13
Medium Priority
?
988 Views
Last Modified: 2012-05-09
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;

0
Comment
Question by:LindaC
  • 6
  • 3
  • 2
  • +2
13 Comments
 

Expert Comment

by:prassoonSuryadas
ID: 28935924
Make sure you have the folder in E:\oracle\Dba\ and its subfolders.
0
 
LVL 8

Author Comment

by:LindaC
ID: 28936189
Yes they exist.

Folders.docx
0
 
LVL 7

Expert Comment

by:vikas_madhusudana
ID: 28938416
instead of

e:
start E:\oracle\Dba\scripts\hot_backup_scripts\hot_OEM10G_backup.bat

have
e:
cd E:\oracle\Dba\scripts\hot_backup_scripts\
start hot_OEM10G_backup.bat

even i some times faced this problem because it will start searching hot_OEM10G_bacup.bat in e: because new cmd promt will be open in e:\ but not E:\oracle\Dba\scripts\hot_backup_scripts\
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 8

Author Comment

by:LindaC
ID: 28938578
Tha is executing ok. What it is not executing is inside the routines:  :Queued and :Loop
0
 
LVL 16

Expert Comment

by:t0t0
ID: 28938626
If you have '@echo off' at the start of your code then change it to '@echo on' and temporarily change 'exit' to 'exit /b' as well. Then run your batch file. At the point where it displays an error messege, it should also display the section of code it was trying to execute. Seeing this would narrow down our search for the problem
 
0
 
LVL 8

Author Comment

by:LindaC
ID: 28938696
Checking
0
 
LVL 8

Author Comment

by:LindaC
ID: 28939753
Because it does not find the borrame.txt it cannot go out of the loop.
Attaching an incomplete log.
log.txt
0
 
LVL 16

Expert Comment

by:t0t0
ID: 28940162
I'm gonna lie down in a minute for a couple of hours and get some sleep as I haven't been to bed yet and my mind is starting to play tricks with me....
0
 
LVL 8

Author Comment

by:LindaC
ID: 28940225
Ok,  I will do the same in a couple of minutes.
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 1000 total points
ID: 28949945
I might be wrong here, but after a quick look the only thing I can see is this line:

set logs=E:\oracle\Dba\logs\hot_backup_logs\hot_backup_logs

Should that be perhaps

set logs=E:\oracle\Dba\logs\hot_backup_logs

To ensure such directories exist you could always add an MD:

MD %logs% 2>NUL
etc.

Steve
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 28950038
though it seems you only use the %logs% and %logfile% variables it makes once for some reason rather than in all the other logfile >> redirects etc?
0
 
LVL 8

Author Closing Comment

by:LindaC
ID: 31708189
Thank you!
0
 
LVL 16

Expert Comment

by:t0t0
ID: 28970243
oh, thanx steve... i was only have some well-earned sleep....
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

VM backup deduplication is a method of reducing the amount of storage space needed to save VM backups. In most organizations, VMs contain many duplicate copies of data, such as VMs deployed from the same template, VMs with the same OS, or VMs that h…
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question