.bat file backup [message #665488] |
Thu, 07 September 2017 05:12 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/d9ec6aa3a43c1d597fcb437baaceefcc?s=64&d=mm&r=g) |
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 Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 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:\>
|
|
|