Create Oracle Database Times "Unable to open file" in Win8 with batch processing

Source: Internet
Author: User

The reason for this problem is that "run with administrator rights" is used when you run the batch process. If the direct double-click Run is no problem.

What if I want to run with administrator privileges?

The reason for this error is that the current directory when running with administrator privileges is not the directory where the batch is located. So, the solution is simple. Just add the following sentence at the beginning of the batch process.

CD/D%~dp0

What do you mean by this sentence?

%~dp0 "D" is the abbreviation for drive, that is, the driver, disk, "P" is the path abbreviation, that is, the directory CD is to go to this directory, but I think cd/d%~dp0 still better option syntax:    ~0         -Remove any quotation marks ("), expand%0    % ~f0        -Will%0 Expands to a fully qualified pathname ("F" is file, that is, files)    %~d0        -only%0 Extend to a drive letter    %~p0        -only%0 Extend to a path    %~n0        -only%0 Expand to a file name ("n" is the name file name)    %~x0        -only%0 Extended to a file extension    %~s0        -The expanded path contains only short names ("s" for short, shorter)    %~a0        -Will%0 File attributes that are expanded to a file ("A" is attribute, that is, attributes)    %~t0        -Will%0 Extended to File Date/time ("T" times)    %~z0        -Will%0 Expand to file size (size)    %~ $PATH: 0   -Find the directory that is listed in the PATH environment variable and add%0 Expands                  to the first fully qualified name found. If the environment variable name is                  not defined, or if no file is found, the key combination expands to an                  empty string to combine modifiers to get multiple results:    %~dp0       -only%0 Expand to a drive letter and path    %~nx0       -only%0 Extend to a file name and extension    %~fs0       -only%0 Expand to a full pathname with a short name    %~dp$path:0-Find the directory that is listed in the PATH environment variable and%I Expands                  to the first drive letter and path found.    %~ftza0     -Will%0 Expands to a similar output line dir%0 for the current batch file if 0 is replaced with 1 for the first file, and 2 for the 2nd

  

Create Oracle Database Times "Unable to open file" in Win8 with batch processing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.