export bat file
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: export bat file

  1. #1
    Join Date
    Nov 2001
    Posts
    42

    export bat file

    Hi,

    I have written one bat file for exports the database everyday. I want to know what is the exact command to set the sysdate in dos
    bat program. So same variable i can use for file name.

    Thanks in advance.

    Sm

  2. #2
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    I'm not a DOS expert so there is proabably an easier was to do this but I do the following.

    1. I have a text file call setdate.txt which contains the following:
    Code:
    SET TODAY=
    2. I have a bat file called getdate.bat which contains the following:
    Code:
    date /t > tmp.txt
    type setdate.txt > setdate.bat
    type tmp.txt >> setdate.bat
    del tmp.txt
    call setdate.bat
    When the getdate.bat file is called from another script it creates an temporary batch file which sets a date variable (TODAY)

    I hope that helps, but like I said there may be a better way to do it (more of a Unix guy myself, thankfully )

    Regards
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  3. #3
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Hi,

    Easiest way wud be, Call VB script program which creates a file and then dump the output of the batch program in that file.

    Abhay.

  4. #4
    Join Date
    Nov 2001
    Posts
    42
    Thanks both of u. I will try this bcz i am also unix expert...in unix this is just 1 min job...but dos....?????????? If anybody know easy way pl let me know...

    Again thanks both of u !

    SM

  5. #5
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    Ah the simplicity of Windoz
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  6. #6
    Join Date
    Nov 2001
    Posts
    42
    Thanks both of u. I will try this bcz i am also unix expert...in unix this is just 1 min job...but dos....?????????? If anybody know easy way pl let me know...

    Again thanks both of u !

    SM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width