Host command to move files. Can i move to db?

Hi i currently have the following code within an oracle form.
host('CMD /c MOVE /Y "'||server_path ||'install\'||p_pgm||'" "'||server_path||'"',NO_SCREEN );     I want to move it to a procedure in the database so I can run witihn scheduled dbms job.
Is this possible?
the db is on the same server as the path if this makes a difference and it is oracle 10g database
Thanks

How can i achieve this in utl_file?I think the docu is quite clear http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/u_file.htm#i1003641
UTL_FILE.FRENAME (
   src_location     IN   VARCHAR2,
   src_filename     IN   VARCHAR2,
   dest_location    IN   VARCHAR2,
   dest_filename    IN   VARCHAR2,
   overwrite        IN   BOOLEAN DEFAULT FALSE);src_location and dest_location are Oracle Directories and src_filename and det_filename should be self-explanatory. Did you try anything and get an error?
Regards
Marcus

Similar Messages

  • 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

  • Host command not opening file

    In a tabular block, i am storing file names, randomly(different file types from diffrent location on hard drive),
    inside field :DOC_LOC
    I have a Preview button, that allows to view the file stored from Form.
    i give the following command, but i find that the Command simply flashes and goes and closes
    and the file is not displyed in its respective application.
    SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');
    host ( 'cmd /C start' ||:DOC_LOCN);
    SET_APPLICATION_PROPERTY(CURSOR_STYLE,'default');At Windows-Start-Run command prompt,, the file opens successfully.
    will anyone help me with correct syntax and code, in case if i am wrong, please.
    Form6i  - on single machine (computer at home)
    TYVM.
    Edited by: enlighten on Jan 3, 2010 12:39 AM

    Hi,
    Redirect the output to a file and look out for any error. I.e
    host ( 'cmd /C start' ||:DOC_LOCN || ' > c:\hostlog.log');Run the form, click on the button. Open the c:\hostlog.log file and see if you have any error thrown.
    Edit : I suspect the issue is because there is no space between start and the file name. It should be
    host ( 'cmd /C start ' ||:DOC_LOCN);-Arun

  • HT1657 I rented Trouble with the Curve and haven't it yet and I when I went to watch the movie it tells me the file can not be found -  please help

    I rented Trouble with the Curve and haven't it yet and I when I went to watch the movie it tells me the file can not be found -  please help

    Yes, thank you.  My apologies, I was typing one handed and did not add that. 
    Anyway, I have tried deleting the cache, deleting my pics and then re-syncing, etc. and nothing is working This is very frustrating, as I had no problems up until about 2 weeks ago, and now all of a sudden, I have this issue......UGH!

  • HT1390 I rented a movie and it shows up in my iTunes "Rented" section, but when I click to play it, it gives me an error message saying the movie can't be played because the original file can't be found. Please help!

    I rented a movie and it shows up in my iTunes "Rented" section, but when I click to play it, it gives me an error message saying the movie can't be played because the original file can't be found. Please help!

    Never mind I fixed it. Just in case anyone else has this problem, after you reinstall iTunes you have to delete all your old music, and if you have iTunes match all the songs you have saved on itunes match will display and you just have to download them to your Macbook.

  • Hi, I have downloaded some avi files and mov files. i am not getting audio while playing the movie. i tried to play with iTunes, QT, DivX player. but I am getting audio in mp4 files. can u help me to fix this

    Hi, I have downloaded some avi files and mov files. i am not getting audio while playing the movie. i tried to play with iTunes, QT, DivX player. but I am getting audio in mp4 files. can u help me to fix this

    First, back up all data and then uninstall "DivX" according to the developer's instructions.
    Then try this:
    VideoLAN - Download official VLC media player for Mac OS X

  • When you try downloading a movie from the internet whick movie file can you download

    which file do you burn to burn a dvd

    when you try downloading a movie from the internet whick movie file can you download
    Depends on the web site. The site programmer can decide whether or on a file can be downloaded/can be saved to your computer. If he/she does not allow you to do this, then your can't download/save anything to your local computer.
    which file do you burn to burn a dvd
    Depends on the type of DVD you are making and how you plan to play the file. For instance, you can "author" the file so it can be played on a commercial DVD player connected directly to your TV or using a DVD media player on your computer. On the other hand, you could also burn the file to a DVD as a data file which can then be copied to a computer and played in a general video media player like QT. You could also burn the video as a data file to a DVD for playback directly from the DVD in a general media player like QT but then you would have to specifically encode the video for CD/DVD playback.
    Suggest you do a little research on the internet to discover the options available to you so you can better decide which work flow best meets your DVD burning requirements.

  • What type of movie files can I put on my Ipod Video?

    What type of movie files can I put on my Ipod Video?

    the only formats that can be synced to the ipod video is .mov and .mp4.
    you need to convert the videos to these formats using 3rd party software.
    To use Videora iPod Convertor to convert movies for use on your iPod, consult these helpful links:
    To get started: http://www.videora.com/en-us/Converter/iPod/
    If you have questions: http://www.videora.com/en-us/Converter/guides.html
    If you have more questions, post them here: http://www.pspvideo9.com/forums/index.php?c=8
    Note that Videora iPod Convertor is a 3rd party program. If you need help with it, post your question there.
    GFF

  • WEBUTIL problems importing a file with the HOST command.

    We are investigating a problem where the users are trying to import a file in from the webserver to be used by the application. The users have successfully moved the file from their local PC to the application server. But, when we perform a HOST command to have the form moved to the UNIX directory, the form hangs. The very last statement of the .BAT file used in the HOST command does the move of the file. And, we can see the entire file in the UNIX directory, we just don't get return back to the form.
    I added displays before and after the HOST command in the form. I see the display before the command but don't receive anything after. The weird thing is this is only happening in our development server. The same issue is not happening in production. Also, if I run the form in client server mode, it works fine also. So, it has to be something on the development application server.
    If anyone has any advice, I would appreciate their help.
    Thanks.

    On the server (assuming Windows since you mention a batch file), locate the Oracle Process Manager Service (for mid tier) on the MS Services Console. Open the properties for this service and click on the "Log on" tab. Check the box labeled "Allow service to interact with desktop".
    That said, if you are executing a batch file on the Windows server to transfer another file to a Unix machine, the above likely won't work either. This is because Windows will not allow a service permission to access network resources (for security purposes). In this case, rather than the above, you will need to change the same setting so a real domain user and not the "Local System" account.

  • Unix Command to Move Folders back into Directory

    As you can see from my previous thread: https://discussions.apple.com/thread/3138884?tstart=0
    I ended up reinstalling Mac OS X 10.6.0 after using "mkdir" and "mv" Unix commands to move my old files to a "previous" folder and I'm still trying to access my account because it's Vile Vault protected. I wish I knew how to move my old folders out from previous into /volumes/macintosh\ HD
    Basically it looks like this right now
    ~/Volumes/Macintosh/HD\ Previous (I'm not even sure if that's written the right way
    I need to move all of the folders out from Previous into ~/Volumes/Macintosh\ HD and deleting the existing ones in it.
    All I want to do is have my old Kernel Panic back because I know how to fix it now.
    Thank you very much!

    Hi Philip
    Philip Han wrote:
    I honestly despise the forum setup... Whenever I wait too long the cursor loses focus so when I hit backspace I go back a page and lose everything I wrote. This has happened to me on 3 different computers now.
    I don't have this problem at all, and I can't make any suggestions on how to fix it.  Maybe you should post a separate thread in the Using the Forums Forum.
    So in the end I went against your advice and moved Applications and Users back to their original folder in HD and I logged in just fine! Well, I did have to boot into single user mode to restore Admin Privileges by creating a new account and then changing Privileges. Some programs didn't start up but it's okay, I know which ones rely on System and whatnot but at least I have nearly everything in its original place and I can back it all up.
    Ahh, you're made of sterner stuff than me !
    Best Buy has $99 1TB WD Passport SE's (The USB 3.0 Version actually!) so I grabbed one immediately and set up Time Machine.
    Sounds like a good choice. 
    Seriously, what other way can you ensure that your data is safe without using File Vault? I use Truecrypt for some things that I don't access much, but daily operations? I'd rather just put up with the sluggish performance of FV!
    I think it depends on what level of security you need. Do you routinely have files that simply must not be read by a third party if your computer gets stolen? 
    FV has always struck me as a hammer to crack a nut, and if something goes wrong you can't even take the disk to a data recovery specialist to get your information back.
    On occasions when I have data that must be kept secure I use Disk Utility to set up an encrypted sparse bundle, which I keep on the desktop. When I need to access files in the bundle then I double click on it and enter the password to mount it.  A minor problem with this is that TM will copy across the whole sparse bundle even if just one file on it is edited. Even so, it's not really a problem since TM is working in the background.
    Thank you for all your help Bob!
    You're most welcome
    Bob

  • How can I use variable name as a prameter value in HOST Command ???

    Hi All,
    How can it possible to use variable value in parameter in HOST command ??
    Following in my code:
    host('rwclient server=reptest report=c:\cust_print.rdf p_1= s_sam_cust_id userid=wh1/wh1@dwh desformat=pdf desty=file desname=c:/temp/'||v_sam_cust_id||'.pdf');
    Regards

    Hello,
    The Syntax of the builtin HOST is :
    SyntaxPROCEDURE HOST
    (system_command_string VARCHAR2);
    PROCEDURE HOST
    (system_command_string VARCHAR2,
    screen_action NUMBER);
    So , you can build the system_command_string as any VARCHAR2
    Example are provided in online help :
    http://www.oracle.com/webapps/online-help/forms/10g/topics/f1_help/builth_m/host.html?tp=true
    Regards

  • 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

  • Can PL/SQL Run Host Command (DOS Command) ??

    Hi All,
    Can PL/Sql run HOST Command ?
    If can't, iis there any other way to execute the DOS command ?
    Thanks for help.
    Iwan

    Hi sarah,
    i have tried, but it didn't work.
    in my abc.sql script : (host in pl/sql level)
    BEGIN
    HOST('cmd /C dir *.*');
    END;
    exit
    but it still didn't work
    so i tried in sqlplus level :
    variable vStatus VARCHAR2(1);
    variable vCmd VARCHAR2(3000);
    BEGIN
    :vCmd := 'C:\Program Files\Internet Explorer\iexplore';
    END;
    HOST("C:\Program Files\Internet Explorer\iexplore");
    EXIT;
    if i put HOST("C:\Program Files\Internet Explorer\iexplore"); --> it worked....
    If i put HOST(:vCmd); --> i won't work.
    Any body can help ?
    Thanks,
    Iwan

  • Host command not executing Excel File

    Hi,
    I am trying to open a Excel file through a bat file.
    And calling this bat file from Oracle Forms 10g - Forms [32 Bit] Version 9.0.4.0.19 (Production).
    But some how nothing is happening.
    But if I issue - host("echo hello > c:\hello.txt"); --> this works fine.
    Host command is as - host('cmd.exe /c c:\temp_dir\File_test.bat');
    and the bat file contains following lines -
    File_test.bat
    cd c:\temp_dir
    PATH c:\Program Files\Microsoft Office\Office11\
    EXCEL Book2.xls
    Can anyone please provide some guidance in this regard?
    Thanks in advance!
    Avinash.
    Pune- India.

    Hey Guys,
    Thanks for your replies,
    But it seems I couldn't communicate my point to you.
    I want to execute the command on application server and not on client machine.
    I guess by using WEBUTIL_HOST it will execute the the command on client side and not on application server.
    I hope i made my point clear.
    Thanks for your help, looking forward to get more help!
    Thanks again!
    Avinash.
    Pune - India.

  • Can Reports 3.0 run a host command?

    Can Reports 3.0 run a host command like in Forms 5?
    null

    Hi! Bill
    ANS: NO
    Bill Fox (guest) wrote:
    : Can Reports 3.0 run a host command like in Forms 5?
    null

Maybe you are looking for

  • IPhoto Version 8.1.2 is not responding, HELP!

    I have two accounts on my Mac, my regular account and my Emergency account. I only got this MacBook last summer for Graduation and it is my college computer so it's really important for me to get it fixed. On my regular account I used iPhoto all the

  • Quicktime software is out of date - NOT!

    I saw this question answered for XP, but I have Windows Vista. For years now, when I open itunes, quicktime or even the apple website, I get the following... 'Some of your QuickTime software is out of date. You can fix this problem by updating to the

  • Need info relevant to marketing / Campaigns SHOW Hierarchy button

    Hi All, When we click the SHOW HIERARCHY BUTTON in Marketing or Campaign in WEB UI, I need the BAPI or CLASS by which we get those displaying values in Hierarchy VIEW... Please help me, thanking you. Regards, VjmHyd

  • Use of Enterprise Services

    Hello Experts, My Scenario is Java Application(Source Data) - SAP PI 7.1 - SAP R/3. I have standard R/3 BAPI available for Data posting in SAP R/3 system. This same scenario I can implement by creating and exposing the Web Service in SAP PI system. b

  • Excise assable value feild in j_1i tables

    Hi Gurus, I would like to know how can we fetch the feild for Exise assable value feild in excise table.... Ravi