Home » Infrastructure » Windows » .bat file backup (db10.2.0 windows8.1)
.bat file backup [message #665488] Thu, 07 September 2017 05:12 Go to next message
stephen2017
Messages: 1
Registered: September 2017
Junior Member
Hello,
I am using db10.2.0 with windows 8.1.

I have a .bat file with following code,
EXP SYSTEM/system FULL=Y FILE=D:\DATABASEBACKUP\ENTIREBACKUP_%date:~-7,2%-%date:~-10,2%-%date:~-4,4%-%time:~0,2%%time:~3,2%.dmp

I simply click this bat file and it brings the backup of entire database with file name in following format,
ENTIREBACKUP_30-08-2017-1311.dmp

It was all good with the name of .dmp file before September, but now as I click that .bat file, it generates the backup file with file name which looks like this,
ENTIREBACKUP_ep-7.dmp

Why is it and how can I get that file name format I had before?

God Bless.

Re: .bat file backup [message #665494 is a reply to message #665488] Thu, 07 September 2017 07:38 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It appears that date format has changed on your computer, some time in September.

In order to check the current date/time format, run (in CMD prompt window):
M:\>date /t
čet 07.09.2017.

M:\>time /t
14:34

The first position is 0 (zero), so - count positions and set the new filename, according to current date & time format, such as (on my computer):

čet 07.09.2017.
012345678901234   <- positions

Positions 4,2 are "07" (i.e. it starts from position 4 and takes 2 characters)

Finally:
M:\>set bkp_name=ENTIREBACKUP_%date:~4,2%-%date:~7,2%-%date:~10,4%-%time:~0,2%%time:~3,2%.dmp

M:\>set bkp_name
bkp_name=ENTIREBACKUP_07-09-2017-1434.dmp

M:\>
Previous Topic: Oracle 12c 64bit and client32 on the same machine
Next Topic: oracle with asp.net error in vps
Goto Forum:
  


Current Time: Thu Mar 28 03:54:29 CDT 2024