Rename File in Oracle Forms before Copy to another drive

Dear All Seniors
I want to ask that how to rename file before copy it to other drive.
Actually when we get file from drive to open then it that time before copying I want to rename it.
------this code i am using for copying file from first path to other.
DECLARE
filename VARCHAR2(500);
BEGIN
filename := GET_FILE_NAME( File_Filter => 'Files (*.*)|*.*|');
READ_IMAGE_FILE(filename, 'any', 'IMAGE6');
HOST ('xcopy "'|| filename ||'" \\172.172.0.4\Combo_pic\',no_screen);
END;
I am using this code it is working fine, but i did't know how to use it before copying file.
host('cmd /c rename "'||:block3.file_name||'" " '||:block3.file_name_n||' " '); --- for file rename
thanks.

Ghulam Yassen wrote:
Dear All Seniors
I want to ask that how to rename file before copy it to other drive.
Actually when we get file from drive to open then it that time before copying I want to rename it.
------this code i am using for copying file from first path to other.
DECLARE
filename VARCHAR2(500);
BEGIN
filename := GET_FILE_NAME( File_Filter => 'Files (*.*)|*.*|');
READ_IMAGE_FILE(filename, 'any', 'IMAGE6');
HOST ('xcopy "'|| filename ||'" \\172.172.0.4\Combo_pic\',no_screen);
END;
I am using this code it is working fine, but i did't know how to use it before copying file.
host('cmd /c rename "'||:block3.file_name||'" " '||:block3.file_name_n||' " '); --- for file renameDear Ghulam Yassen,
As salamualikum
>HOST ('xcopy "'|| filename ||'" \\172.172.0.4\Combo_pic\',no_screen);
Change the above line by the following line. It will rename as well as copy.
HOST ('xcopy "'|| filename ||'" \\172.172.0.4\Combo_pic\'||:EMP_CODE||'.jpg',no_screen); ---here EMP_CODE is a column value.Above code will rename to emp_code value.
Hope this works...
Hamid

Similar Messages

  • Embed Animated Flash Objects (*.swf file) in Oracle Forms.

    Hello All,
    To Embed Animated Flash Object (Shockwave *.swf File) in Oracle Forms, Please Follow the Steps Below.
    1. Draw "ActiveX Control" Item on Canvas with the Name "OCXITM".
    2. Select "ActiveX Control" Item & Go to its Properties (By Pressing F4).
    3. Select "ShockwaveFlash.ShockwaveFlash" in "OLE Class" Property of "ActiveX Control" Item.
    4. Come again to the Canvas.
    5. Right Click on "ActiveX Control" Item, Select "Insert Object...".
    6. In Control Type List, Select "Sockwave Flash Object" and Press "OK".
    7. On Canvas, Select "ActiveX Control" Item, Go to "Program" Menu, Select "Import OLE Library Interfaces...".
    8. Select All "Method Package(s)" & "Event Package(s)" for "ShockwaveFlash.ShockwaveFlash.X" & Press "OK".
    9. Go to "Object Nevigator" (By Pressing F3) & Expand "Program Unit" to verify that the Packages are Successfully Imported.
    10. Compile All the Objects (By Pressing "Ctrl+Shift+K").
    11. In "WHEN-NEW-FORM-INSTANCE" Trigger Write the Below Code.
    ** Author   : Muhammad Waseem Haroon                        *
    ** Dated    : 07-Apr-2005                                   *
    ** Purpose  : To Call Macromedia Flash Object (*.swf File)  *
    ** Module   : Logo                                          *
    DECLARE
         oleitm OLEOBJ;
    BEGIN
         oleitm := :item('OCXITM').INTERFACE;
         ShockwaveFlash_IShockwa_0.Movie(oleitm,'d:\movie.swf');--it can be dynamic.
    END;12. Compile, Save & Run Your Form.... and... See the Beauty.
    Thanks & Regards
    Muhammad Waseem Haroon
    [email protected]
    [email protected]
    [email protected]

    Mark Striekwold did an effort to put flash into forms
    http://mark-oradev.blogspot.com/2010/02/flash-inside-oracle-forms.html
    http://mark-oradev.blogspot.com/2010/02/flash-test-inside-oracle-forms-part-2.html
    http://mark-oradev.blogspot.com/2010/04/flash-test-inside-oracle-forms.html

  • Attach pdf files in oracle forms 11g

    Hello everyone, I would like to know if is possible and how to attach a pdf file in oracle forms, and how to open it to read it
    thanks

    hello ,
    u can also try out a HOST command in Oracle Forms.
    Give path of PDF file and it will open PDF directly.
    Thanks
    HARSH SHAH

  • How to open .cmdrw file from Oracle Forms 10g

    Hi,
    We need to call *.cmdrw* file from Oracle forms 10g. Is there any way to call *.cmdrw* file from Oracle forms 10g?
    Thanks for the help.
    Viishnu Nekkanti

    In case you want to open a .cmdrw with its associated application you can use the following procedure:
    webutil_host.NonBlocking( 'rundll32 url.dll,FileProtocolHandler ' || client_filename );This works for every file where a program has been associated to its file extension. (Adobe Reader for *.pdf, Microsoft Word for *.doc, Microsoft Excel for *.xls and so on)
    Regards
    Markus

  • Display blob file with oracle forms

    I need to display an image file with oracle forms.
    can any body tell me how to do this ?
    Thanks

    How to do this is dependent on which version of Oracle Forms you are using. Please let us know what version (eg; 10.1.3.x.x not 10g) of Oracle Forms you are using and how your application is deployed (Client/Server or web). If web, what is your Java version?
    Craig...

  • Where does one find the jar file for oracle.forms.[ui/pjc/...]

    Hello,
    I'd like to run some of the forms samples on technet, but I don't seem to have the jar file containing oracle.forms.[ui/pjc/...]. Does anyone know here I can find it?
    Thanks
    Eric Kamradt
    [email protected]

    Hi,
    Check out the "download" link at the following address.
    http://cougaar.org/cgi-bin/viewcvs.cgi/jars/lib/jbcl.jar?cvsroot=core
    Hope that help,
    Jack

  • How to run batch file from oracle forms 9i

    Hi everyone.
    i have a data in csv file. i want to upload it to my database. i am using sql loader for it.
    i have made a batch file which run the sql loader and transfer my data to database.
    How to run batch file from oracle forms 9i.
    when i press the button, nothing uploads in my database. (when i simply run the batch file it works).
    here is my code
    Begin
    HOST('C:\temp\batchfile.bat');
    message('done');
    end;
    Thanks in advance
    regards
    sajid

    this is my log file, when i run manually.
    SQL*Loader: Release 10.2.0.1.0 - Production on Thu Jul 1 23:27:53 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Control File: file_to_upload.ctl
    There are 2 data files:
    Data File: sk.csv
    Bad File: sk.bad
    Discard File: none specified
    (Allow all discards)
    Data File: sk1.csv
    Bad File: sk1.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table KHAN, loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    SR FIRST * , O(") CHARACTER
    DATES NEXT * , O(") CHARACTER
    AGENT NEXT * , O(") CHARACTER
    COUNTRY NEXT * , O(") CHARACTER
    TRANSACTIONS NEXT * , O(") CHARACTER
    PKR NEXT * , O(") CHARACTER
    USD NEXT * , O(") CHARACTER
    BANK NEXT * , O(") CHARACTER
    Table KHAN:
    11088 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 132096 bytes(64 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 11088
    Total logical records rejected: 0
    Total logical records discarded: 0
    Run began on Thu Jul 01 23:27:53 2010
    Run ended on Thu Jul 01 23:27:54 2010
    Elapsed time was: 00:00:00.63
    CPU time was: 00:00:00.17

  • Call an executable file from oracle forms 6i

    Hello ,
    i want to call a local .exe file from oracle forms 6i passing along a couple of parameters in the command line .
    Can anyone help me out here ?
    thanks
    C.
    Edited by: user539712 on Jan 21, 2011 11:55 AM
    Edited by: user539712 on Jan 21, 2011 11:55 AM

    that worked...now i am facing a different issue now which i didnt have without the start command . i am calling iexplorer.exe but i am passing a long a url in the command line . the 2nd parameter in the url is not working so when i do :
    "start c:\progra~1\intern~1\iexplore.exe" http://localhost/hello.jsp&a=ddd&b=333
    the &b=333 is not passed (some issue with the & character i am guessing). Would you know a workaround ?
    thanks

  • How to call a .rpt file from oracle form 10g

    I need to call a .rpt file from oracle form 10g. please suggest what to do for this

    Hi,
    onlz rdf and rep files are Reports executables. Convert rpt to rep and you are file (Reports has a conversion utility in the bin directory)
    Frank

  • How to generate excel file in oracle forms 10g on client machine

    dear Sir,
    I am using just file server(installed 10g dev suite) not a oracle application server,
    I am running my application from another machine ,it running fine i want to generate excel report on client machine
    presently i m using OLE2 for fetching the data in excel , it is working fine but it generates the excel file on file server machine and i want get the output excel on the client machine. aftre OLE2 i m using CLIENT_OLE2 with webutil (instead of OLE2) its get compile successfully but during runtime it give error "oracle.forms.webutil.ole.OleFunctions bean not "found.CLIENT_OLE2.create_obj will not work"
    *so please tell me without oracle application server is this possible or not .*

    your webutil on server side is not configured
    you need to re install the webutil jacob.dll files etc. then it will work fine..
    you can also generate excel file using reports to change the destination format in SPREADSHEET

  • Generate .PDF file from Oracle Form and print .pdf

    Hello, I am new to oracle form. I need direction on how to create .pdf file on a button click.
    The requirement is when user click a button on a form, I need to write some data to the pdf file and open the .pdf file for print.
    I am using Oracle Form builder 10.1.2.0.2
    Thanks a lot! Please help!

    Dear all,am new to oracle report and oracle forms and i know the
    basics how to generate the report and to create the form, Now my doubt is, like generating report
    from oracle report how to generate the report from oracle from,should i add any command button? and where
    to add the coding and what coding ? when i click that command button the report should be generated like oracle
    report,what should i do?Please help me to learn.
    my table name is 'student' and it has the following columns,
    sid,sname,grade,result.
    Am using oracle from 10.1.2.0.2 version and
    oracle report version is 10.1.2.0.2.
    Please give step by step procss.
    Thank you.

  • How to Save a File in Oracle Forms 6 ?

    Dear All,
    I am using Oracle Forms 6. I need to save a file in .lst format.
    I am using,
    flnm:=get_file_name('E:\',file_filter=>'Text Files(*.lst|*.lst|');
    I f I use this, It prompts me to save the file. I want to save it automatically without asking me to enter the file name. We can get file name too from the above syntax
    flnm:=get_file_name('E:\','Test',file_filter=>'Text Files(*.lst|*.lst|');
    But i dont want the system to prompt me to save manually. It must be saved in the proper location as mentioned.
    Advance thanks for all.
    Kindly help me to overcome this issue

    Here's an example of a way to write out a file which writes out data from a particular block. The field names are hard coded so need to
    be customized:
    /* write out data as tab delimited file for import into
    excel etc */
    function write_file (myfile in varchar2) return varchar2 IS
      out_file          text_io.file_type;
      item_name varchar2(32);
      errnum number := ERROR_CODE;
      errtxt varchar2(80) := ERROR_TEXT;
      myblock varchar2(32) := 'MY_BLOCK';
      addrno integer := 0;
    BEGIN
      go_block(myblock);
      go_record(1);
      out_file := text_io.fopen(myfile,'w');
    /* output field header for excel or word */
      text_io.putf(out_file,'%s\n', 'notes' || chr(9) || 'subR' || chr(9)||'X' || 'someid' || chr(9)  ||
        'title' ||chr(9)||
            'first_name'||chr(9)||'last_name'||chr(9)||
          'home_address'||chr(9)||'home_city'||chr(9)||'home_state'||chr(9)||'home_zip');
      LOOP
            if (addrno > 0) then
                   text_io.putf(out_file,'\n');
            end if;
            addrno := addrno + 1;
            text_io.putf(out_file,'%s',:MY_BLOCK.some_notes || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.sub_ripple || chr(9));
            text_io.putf(out_file,'%s','X' || :MY_BLOCK.someid || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.title || chr(9) || :MY_BLOCK.first_name
                            || chr(9) || :MY_BLOCK.last_name || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.home_address || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.home_city || chr(9) || :MY_BLOCK.home_state ||
               chr(9) || :MY_BLOCK.home_zip);
            IF :SYSTEM.LAST_RECORD = 'TRUE' THEN
             EXIT;
         END IF;
         NEXT_RECORD;
      END LOOP;
    text_io.fclose (out_file);
    return 'Y';
       exception
         when others then
             message ('ERROR write_file '|| myfile || ' ' || :system.cursor_block || ' '
             || :system.cursor_record || ' ' ||:system.cursor_field || ' '
              || errnum || ' ' || errtxt);
             bell;
             synchronize;
             return 'N';
    END;

  • Opening an *.txt file in oracle forms 4.5

    I am facing this problem I want to call an text file from a certain location and display the same when an user hits a particular button which has to be done in Oracle Forms 4.5.
    Could u pls help me

    If you want to display the *.txt file use ole object to do that and if you want to read the data from the text file and display in the text field then use textio package.
    Hope this helps you.
    Regards
    Gaurav

  • How to call .BAT file in Oracle Forms

    Hi All,
    I am using Oracle Forms 6i. We have a .Bat script which moves file from our local directory to the server.
    I want to invoke this .Bat script to be called when I click on a button in the form.
    Appreciate your help here.
    Thanks,
    Madhu K.

    Hi
    I use this in oracle forms 6i: first i assign this path to a variable:
    DECLARE
    v_path   VARCHAR2(1000);
    BEGIN
    v_path:= 'C:\file_name.bat'  then I use the host command:
    HOST( 'cmd /c start' || v_path , no_screen); 
    END;Hope this helps...
    Regards,
    Abdetu...

  • Playing Flash File in Oracle Forms 9i

    Hi there,
    I used to Play flash files in Forms using active x controls. But they are no more there.
    So how can I include a flash file in my forms using Oracle Forms 9i.
    Plz help me.
    Thanks

    Ali,
    you would need to find a Java Bean environment to play Flash (quasi a flash runtime in java). this then can be added as a Java Bean to Forms.
    Check the Java Media Framework
    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=MEDIA+FRAMEWORK&col=java&col=wireless
    Frank

Maybe you are looking for

  • Finder window free space

    I just upgraded from Snow Leopard, and I was playing with the new OS (Mountain Lion). And in Snow Leopard, there was a at the bottom of every Finder a ribbon of text saying how much space was in the hard drive. Is there a way to put that ribbon in th

  • Surface RT Windows 8 - Install Issue

    I am using a Surface RT with Windows 8.  Am I not able to download flashplayer/adobe?

  • OR Logic In Interactive Report Filtering

    Hello All. I'm using Apex 4.1 on Oracle 10.2.0.5 and Oracle App Server 10g (mod_plsql). Apex is being viewed using IE7/8/9 and Firefox 3.x. I've created an IR in which I've set-up filters for 3 columns. I notice that these filters are always using "A

  • P6N SLI , what is a good monitoring progran for temps, ect

    I read that MSI program for temp monitoring isn't good to install so what does work with out taking alot of resorces ?

  • Q: How do I Mask/Layer a color photo with a black and white photo?

    This is what I want to do. I've done it before but cannot remember for the life of me how to do it again. I want to put a color photo under (its own) black and white photo and then erase or remove or something (I can't remember the tool to do it) but