Using HOST command to copy files

Platform is Win network (98/NT/2k Prof), application is loading a picture into a blob field. Button executes the get_file_name built in to let the user select a file from the network, but code must copy the file to a directory that is on the oracle server so that the bfilename function can access a local directory. Then I can use dbms_lob.loadfromfile to actually load the picture.
The problem is that I cannot formulate a correct command for the HOST built in that will copy the file. I use message to display the command variable and it looks right, but the file does not get copied and the HOST command does not return an error.
Any help would be appreciated, thanks.
Mark.
null

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Marc Riesewijk ([email protected]):
Hi Mark,
You can use the library d2kwutil. It should be in a directory of the Developer demo's.
In this pll-file, there a procedure which enable you to copy, delete and move files on Windows.
Hope this helps!
Marc<HR></BLOCKQUOTE>
Ah,it's in \%orahome%\tools\devdem60\demos\forms\,I got it,it's Win_api_utility procedure,it has copy_file,delete_file etc.
It's very good.:)
null

Similar Messages

  • Use Host command in Oracle forms 6i

    hi
    all
    i use Oracle forms 6i i run in a web and in that i have connect one server so,
    i have to use Host Command and i have to fire this command
    host (' net use \\windchillsvr\e\jyotionline /user:dwg_users dwg_users');
    But it's Not Connect
    My Forms in run in Web
    so help

    JavaBean does d othe job for you but it requires signing process; I used it when I was working on forms6i for our project.
    I could use another approach that is the file type command executable which it stays in client's PC to do it and it does not requires signing at all since I am now working on the Java EE project for downloading and launching the third party tool in client's PC.
    I plan to write a article for forms use, which could do all the heavy WebUtil can do, but not need to go thru the signing process.

  • Calling SQL Loader using HOST command from Developer Forms 4.5

    I want to execute a set of code from D2K Forms 4.5 which has interfface with Client - OS ( In my case Windows NT/XP). I want to execute SQL Loader from Forms using Host Command and then after completion of that process, I want to do next transcations ( depending upond success of HOST/SQL Loader).
    How to achive this?
    I tried writing code like this ...
    l_vc_command := 'sqlldr73'
                        ||' USERID='||l_vc_username||'/'||l_vc_password||'@'||l_vc_connect_string
                        ||' CONTROL='||l_vc_filepath||'Upload.ctl'
                        ||' DATA='||LTRIM(RTRIM(l_vc_fileloc))
                        ||' LOG='||l_vc_filepath|| l_vc_log_file || '_' || l_dt_sysdate_str ||'.log'                    
                        ||' BAD='||l_vc_filepath|| l_vc_bad_file || '_' || l_dt_sysdate_str ||'.bad'
                        ||' DISCARD='||l_vc_filepath|| l_vc_discard_file || '_' || l_dt_sysdate_str ||'.dsc';
    HOST(l_vc_command,NO_PROMPT);
    After this command i want to do some other code execution. so even if it fails or success, next code is executed. How to control this?
    Please help..
    Regards,
    Milind

    Forms6i running on W2000, Rdbms 8.1.7
    in Forms I added a button TEST,
    Trigger when-button-pressed : host('test.bat') ;
    in directory .......\frm I added file test.bat :
    REM ===============
    cd /d C:\........\ldr
    pause
    sqlldr parfile=test.par
    pause
    type test.log
    pause
    exit
    REM ================
    now, pressing TEST button opens DOS window, telling me what's going on, running sqlldr, finally going back to forms
    Are you using NO_PROMPT or NO_SCREEN option of HOST command ?
    Had a look at Forms 4.5 manuals, there is no mentioning of (a)synchronously operation in connection with HOST command.

  • Calling SQL Loader from Forms 4.5 using HOST command in Win2000

    One of my forms calls SQL Loader 7.3 using HOST command to load a csv file onto the database(Oracle 7.3) under Windows 2000 platform.
    Only after sql loader finishes its operation the control should come to my form i.e. synchronous execution.
    As of now its running asynchronously.
    Is there any way to make it synchronous. If Not any other work arounds?
    Environment Details
    Forms [32 Bit] Version 4.5.10.6.0 (Production)
    Windows 2000 Operating System
    Oracle7 Release 7.3.2.3.2

    Forms6i running on W2000, Rdbms 8.1.7
    in Forms I added a button TEST,
    Trigger when-button-pressed : host('test.bat') ;
    in directory .......\frm I added file test.bat :
    REM ===============
    cd /d C:\........\ldr
    pause
    sqlldr parfile=test.par
    pause
    type test.log
    pause
    exit
    REM ================
    now, pressing TEST button opens DOS window, telling me what's going on, running sqlldr, finally going back to forms
    Are you using NO_PROMPT or NO_SCREEN option of HOST command ?
    Had a look at Forms 4.5 manuals, there is no mentioning of (a)synchronously operation in connection with HOST command.

  • Running an SQR using HOST command

    We are using Forms 10g and want to call sqr using the host command. The only way we can get this to work is to put the sqr call in a shell script which also contains all of the necessary environment variables and then use host to run that shell script.
    I've tried putting the environment variables in default.env to no avail.
    (This is a UNIX environment).
    Is it possible to run an sqr directly using the host command?
    host('sqr .....')
    Thanks in advance!

    nope. You can use host command. And modify the shell script in such
    a way that the results are written to a text file and read the result using
    text io
    Best regards
    Rajesh ALex

  • When I connect to our server using smb:// can't copy files or edit names on server?

    When I connect to our server using smb:// can't copy files or edit names on server?

    Why not? What happens?
    Do you get an error message? What does it say?

  • How to use host command for creating folders

    i want to create a folder called abc in my C drive using forms 6i.
    how can i do it using Host command?

    Host('MD C:\ABC');Francois

  • Using host command

    hi all i am shayan and again prob:-(
    i am using oracle 9iDs and forms are run on the web......i had used host command...but it is only open the program on the server....for example i haved open calculator with host command but it is only open on server not on the local computer

    Forms was originally designed as a client/server product. This means that functions like HOST, TEXT_IO, OLE, etc were expected to perform a task on the client machine. Well, this really hasn't changed with the deployment moving to the web. However, the difference is that the client to the database is now the middle tier and these tasks are executed there.
    To perform actions on the end-user (client) machine you will need to use a signed Java Bean. As mentioned by harmvos, Oracle offers WebUtil as an add-on to Forms if you don't want to write your own Java Bean. It can be used with Forms 9.0.4 and newer. It can be used with 902, but since 902 is no longer supported, this isn't recommended.
    http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm

  • Run shell script using Host Command

    How do I run Unix Shell Script using Host command?
    Please help me......

    Are you running the shell script from the same box as the forms are deployed in? If not, then HOST call will try to execute on the machine where the forms are hosted(App server).

  • Using UNIX command to copy desktop files/folders

    Hello All. I need help using UNIX command(s) to copy text documents and or folders from my lab computers to my desktop at home. Since I have such a slow connection, I think this will work best. I need help with the cp command and the path mostly. Since all files would be in folders on the desktop (including documents (that "missed" the folders), I believe I could simply copy desktop contents? Thanks, J Langlois

    What you want to do is SCP (secure copy) your documents to your remote host.
    send this command to the computer with the documents
    scp ~/Desktop/FILEOR_FOLDERNAME USERNAME@REMOTE_COMPUTER:~/Desktop/
    Replace all the stuff in UPPERCASE with the correct vales for your situation.
    Mini (Intel Core Duo)   Mac OS X (10.4.8)  

  • Problem using Host command to call a batch file

    Hi all,
    I am trying to call a batch file with the Host command:
    host c:\test\u.bat
    where u.bat calls unix2dos.exe with a parameter of d_unix.txt.
    Bat file looks like this:
    C:\test\unix2dos.exe d_unix.txt
    PAUSE
    The bat file gets called fine, but the following error occurs (in the cmd prompt):
    T:\globals\ORACLE8\bin>C:\test\unix2dos.exe d_unix.txt
    d_unix.txt:
    Can't open file
    T:\globals\ORACLE8\bin>PAUSE
    Press any key to continue . . .
    Running the batch file directly in windows works fine. The batch file also runs fine from the Host command if I remove the d_unix.txt parameter.
    The file d_unix.txt file is in the same directory as the batch file and as unix2dos.exe.
    Running from Sql Plus in a windows environment.
    Any thoughts?
    Edited by: dgouin on Aug 19, 2009 11:41 AM
    Edited by: dgouin on Aug 19, 2009 11:42 AM
    Edited by: dgouin on Aug 19, 2009 11:42 AM

    I always understood that it worked with whatever directory you were in when you launched the SQL*Plus binary:
    D:\>SQLPLUS dbuser@testdb
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Aug 19 15:26:35 2009
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    dbuser@testdb > HOST ECHO %CD%
    D:\
    dbuser@testdb > exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    D:\>H:
    H:\>SQLPLUS dbuser@testdb
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Aug 19 15:27:03 2009
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    dbuser@testdb > HOST ECHO %CD%
    H:\
    dbuser@testdb > exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

  • Using tar command to copy faster

    Hi,
    I want to copy the apps directories and subdirectories to another location on same machine for cloning purpose.
    I know this can be achieved using tar command.
    Will you pls send me the tar command to archive and copy at the same time using pipe "|" .
    Thanks,
    Dnyanesh

    Hi Funky,
    Permissions are assigned based on uid, not username. When you unpack the tar file with the 'p' option as root, the files will have the same uid on the target system as they did on the source system. In this case, preserving permissions for 'root' should not be a problem. The uid for root (0) does not usually change. The complication is with the uid values for non-root users.
    As far as preserving the uid for non-root users (like oracle or applmgr)...mostly I just try to keep these in sync across my systems as much as possible. :) For example, although the applmgr user on my production system is 'applprod', and on my test system is 'appltest', they both have the same uid (1003). That way, when I unpack a tarball from my production system on my test system, all the files that were owned by 'applprod' show as being owned by 'appltest'.
    In your example, if user 'xxx' on production and user 'yyy' on the clone server had different uids (for example, 1003 and 1004), the easiest thing to do is to try changing the uid of user 'yyy' on the clone system:
    usermod -u 1003 yyy
    This will only work, of course, if there is no other user on your clone/target system with uid 1003. :-)
    If you do have another user on your target system with uid 1003, then when you unpack the tar file on the target, your files will definitely have the wrong owner. You can still change that without touching root-owned files by using chown to change just the files owned by the "wrong" user:
    chown -R --from wronguser correctuser $ORACLE_HOME
    If your Linux doesn't support the --from syntax for chown (I primarily use SUSE/SLES and don't have my Redhat VM handy to check), you could also use find:
    find $ORACLE_HOME -user wronguser -exec chown correctuser {} \;
    Again, the point of the chown and find commands is that they'll leave the files that are supposed to be owned by root untouched.
    Sorry for the long post, I tried to go for comprehensive instead of brief this time. :-)
    Regards,
    John P.

  • Using with Linux to copy files

    Did anybody try copying files from Xperia Z1 to Linux? I do not have SD card in my new phone (yet). And I would like to copy photos and videos from Xperia z1 internal memory to Linux. When I connect to system, Linux could not detect as a diskdrive (though lsusb command showing the device).
    BTW, I am able to copy files using Windows 8 after installing Sony software for the xperia z1 device without any issues. Only Linux could not detect it. Are there any special drivers that I have to install on Linux?
    Linux version: Ubuntu 12.04
    Solved!
    Go to Solution.

    To access the internal memory in the phone the distro you use in your computer needs to support MTP.
    From what i've found, Ubuntu 12.04 may have problems with MTP in phones using Android 4.x while it should work fine in Ubuntu 13.04 and later.
    If you don't want to update to a later version of Ubuntu you could try a 3:rd party solution like: http://www.webupd8.org/2013/01/upgrade-to-gvfs-with-mtp-support-in.html
     - Official Sony Xperia Support Staff
    If you're new to our forums make sure that you have read our Discussion guidelines.
    If you want to get in touch with the local support team for your country please visit our contact page.

  • I have a windows vista pc and want to use migration assistant to copy files over. From what I understand, it will copy over my user profile and settings as well. Is there anyway to just copy files?

    Hey everyone, I just bought a new macbook pro 13-inch (late 2011 model) and I want to use migration assistant to copy over my photos, iTunes library, documents, etc. I know this can be done wirelessly or by connecting the two computers by Ethernet cable (windows vista pc --> macbook pro). Which is faster?
    I also have heard that using migration assistant copies over the user file as well and makes it the new one on the mac. I would only like to copy over files, not user settings. How do I do this?
    Thanks!
    P.S. I'm assuming that when my iTunes library is copied, the mp3 files are copied too. Could someone please confirm this?

    http://www.apple.com/support/switch101/
    http://www.macworld.com/article/153952/2010/09/superguide_switchingtoamac.html?l src=nl_mwweek_h_cbstories

  • Use Host command in Oracle Database Trigger

    I need to run Host command from a database trigger in order to execute a sh file in a Solaris, Unix, environment. How can I do it? The database environment is in Solaris and the database is 10g.
    Please let me know as soon as possible.

    Hi,
    read this <http://devtrigger.blogspot.com.br/2012/08/svn-backup-on-unix-or-solaris.html>
    Or
    you can to run in nohup. For example
    You can a script with the command vi about your trigger and run with the sintaxe bellow:
    nohup sqlplus "/as sysdba" @script.sql &
    Where "script.sql" is the name of the your file.
    Kind regards,
    Bruno Reis.
    www.brunors.com

Maybe you are looking for

  • Database incomplete recovery - Oracle 10.2.0.1

    This is just some testing I was doing on RHEL 4 Oracle 10.2.0.1 SQL> alter database open resetlogs; alter database open resetlogs ERROR at line 1: ORA-01113: file 1 needs media recovery ORA-01110: data file 1: '/u01/plsql/plsql/system01.dbf' SQL> rec

  • Miro, FB60, FB65, F-41

    Good Day to All SAP Gurus!! Here is my scenario: In MIRO and FB60, we raise a payable. 1. Upon MIRO, i have to create a credit memo using FB65, without affecting the inventory portion.  Let's say i just have to lessen the payable portion and charge t

  • Is 11G Ready for Production Env.?

    Hi, Our company is planning to upgrade for 11G and we have lots of queries for which i've been in touch with Oracle. At the same time, i'm gathering users views who are presenly runnning 11g on Production enviornments. I would greatly appreciate your

  • Workitemurl in email template is incomplete

    Hi all, I am using sy.workitemurl to send current workitem's url through email. But in the mail received, this url is incomplete. For example :- following is the URL received in mail http://host:port/webdynpro/dispatcher/sap.com/cafeugpuirt/Runtime?a

  • When will Cairngorm 3 Modules library be released?

    Need to know when Cairngorm 3 Modules library will be released.  Right now it is in Beta. Also is there a roadmap somewhere for the Modules Library? Thanks