How to rename a file system per host?

Hi all
I use a code in the Save button to copy and rename a normal system file to some place.
The code copies the file in this location correctly but do not rename the file

Code:

DECLARE
fin_path VARCHAR2 (200);
CONVID PLS_INTEGER;
FIN_NAME VARCHAR2 (300);
BEGIN
commit_form();
fin_path: = 'W:\EMP_PIC '; -the target location
FIN_NAME: = fin_path | ' \'||:ATT_NAME||' ' || : NO. |'. ' || : ATT_TYPE;
-: ATT_NAME the name of the file ex: size
-: no no normal ex: 120
-: att_type ex file type: jpg

IF: ATT_PATH IS NULL THEN
NULL;
ON THE OTHER
GO_BLOCK ('PERSON_DATA');
ConvID: = DDE. App_Begin ("xcopy/y ' ' |: ATT_PATH |" ") » "'|| fin_path | ' ' ' ', DDE. APP_MODE_MINIMIZED); -the file is copied correctly
host (' Rename cmd /c "" |) FIN_NAME |' « ') ; -a not rename the file!
end if;


EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
END;

Note: I'm using Forms 6i

host (' Rename cmd /c "" |) FIN_NAME |' « ') ; -a not rename the file!

The RENAME command takes two parameters (file to be renamed and the new name) and you had only one. It seems you are trying to combine the old name and the new name in the same setting, but when you RENAME this to the command in Double-quote ("'") operating system treats this as a unique filename with spaces. Try to separate the variable output of file name of the new file name variable. For example:

DECLARE
   fin_path VARCHAR2(200);
   old_name   VARCHAR2(300);
   new_name  VARCHAR2(100);
BEGIN
   fin_path := 'W:\EMP_PIC'; -- the target location
   old_name := fin_path||'\'||:ATT_NAME;
   new_name := :NO||'.'||:ATT_TYPE;
   ... rest of your code here...
   host('cmd /c rename "'||OLD_NAME||'" " '||NEW_NAME||' " '); -- the file didn't rename!

   ...rest of your code here...
END;

Hope this helps,
Craig B-)

If someone useful or appropriate, please mark accordingly.

Tags: Oracle Development

Similar Questions

  • How to rename a file when you move it

    How to rename a file when he tries to move it to another directory and it already exists?
    I thought I could use a match pattern on the paths of the source and destination, because after a certain point, the path would be the same, and then with another model of correspondence I extract only the name and use a path of construction.
    I don't know if it would actually work. Can anyone give me any suggestions?
    Thanks in advance!


  • How to rename multiple files with the extension in windows xp

    How to rename multiple files with extension in windows XP.

    1. If you want to simply rename the extension, open a run window (Windows Logo key + R), type cmd and press ENTER. Using the CD (Change Directory) command, navigate to the folder in question. Now, type ren *.mp3, *.mp4, and press enter (note the two spaces in the command). Note, rename mp3 MP4 is just an example of the command.

    2. If you want to rename files, download the 32-bit version or 64-bit Bulk Rename, here http://www.bulkrenameutility.co.uk/Main_Intro.php

  • With the changes made in the Adobe Acrobat DC he has made things more difficult for me. All I want to do is to rename a file. Used to be simple. Please tell me how to rename a file without using the cloud. I'm not paying for storage when I have an SD card

    Hate the new update.  I need to rename files and cannot do without using the cloud.  Could not sign in the cloud free services.  Someone knows how to rename the files with Adobe Acrobat DC? I use a HD with Android corner.

    Do you have any file manager installed on your device? This feature is no longer available in the latest version of Acrobat DC but we actively seek to provide the same in one of our future releases. To work around the problem, you will need to duplicate/rename the files using a third-party file manager application.

  • How to create a file system datagrid in an application web flex

    How to create a file system datagrid in an application web flex

    Hello

    Read this:

    http://Shigeru-Nakagaki.com/flex_samples/FileReference/FileUploadExample2/FileUploadExampl e2.html

    Johnny

    Please response rate.

  • How to rename multiple files in Windows Explorer with numbers that I choose?

    I have Windows Vista Ultimate, when I try to rename several .jpg files, it won't let me choose my starting number.  It is automatically defaulted to 1.

    Hello

    You cannot rename multiple files at once by the design of the operating system. However, try this at your own risk:

    http://www.chosensoft.com/batch-file-rename/index.htm

    All the best!

  • How to rename music files in Vista

    In Windows XP, I am able to use Windows Explorer and rename my music files and she uses gracenote to get all the correct information, and he even wrote the tags. I can't do it in Vista, someone tell me how?

    Thank you

    I'd give a click on the folder that contains the music files and then select Rename or move. It would take me a menu where I can choose how I wanted the files to show, to know the title and artist, and if I wanted the Tags etc, once I hit OK , it would connect via gracenote and rename and date all files as well as fix the tags for the files.

    It was all in Windows Explorer? Are you sure it wasn't in WMP?

    If it's all the Explorer, then this certainly looks like a third-party plug-in or a program, as Explorer does not have something like the built-in search Gracenote. would it be possible to create a screenshot of this? You can then transfer them to a site like http://imageshack.us of sharing image and post the link here resulting.

    Tim Baets
    http://www.BM-productions.TK

  • VM simulator - how to access the file system.

    I was wondering if anyone knows how to access the file vmware playbook simulator system.

    I don't want access programmatically, I covered, for access to the file system to copy files to the Simulator in shared directories.

    When you connect a playbook on the USB, it shows up as a drive, and I would like access to the same playbook vm dir structure to copy files for testing. for example if your s app access the pictures on the camera, I would like to copy some images for the test. Any ideas?

    TIA - dave

    Search the forum for more information on using 'ssh' to access the Simulator and more specifically help 'scp' or 'sftp' to transfer files to. You will do this in the files under/accounts/1000/shared, and if you're on Windows you will probably be to install PuTTY to do this. Feel free to ask for help more once you have dug through it all.

  • How to rename a file?

    I can't understand how to rename a document file that I continue to review.  I don't know that I'm missine clearly!

    Hi nns.

    You work on the file in Acrobat or Reader? If so, it is an easy by choosing File > save as and give the file a new name. Then, you will have two copies of the file: one with the old name and the other with the new. (The same principle contains true is pretty much all applications).

    Best,

    Sara

  • Virtual machine with Redhat - how to extend the file system

    I have a virtual machine with redhat.  the machine was created with 20 GB of space.  I changed the settings and gave him 30GB.

    / Dev/sda watch now 30 GB

    But/dev/map/VolGroup00/LogVol00 shows that the 20 GB.

    How can I get the file system to extend with the other 10 GB of space?

    Thank you!

    Mackman wrote:

    How can I get the file system to extend with the other 10 GB of space?

    With a lot of attention.    I just went through something similar myself.  This web site has been very useful: http://www.linuxnetadmin.com/2008/01/how-to-add-disk-space-with-lvm-on-linux.html

    The website above describe the steps when adding an additional drive, but the steps for extending on a new partition on the same disk should be similar.

    Take a snapshot first in case things go very wrong.

  • How to rename a file flat concatenation date and time, file name?

    I created a package where I run a first interface that uses a flat file to a server and load into a table of Teradata.

    After using the OdiFtpPut API, I used a FTP file and send to an outfit.

    Given that this procedure works every day, I need when FTP get concatenation destination file name, the date and time of execution.

    What is the best practice for this?

    using the odi APIs, you can get the date and time

    <%=odiRef.getSysDate("dd_MM_yyyy_hh_mm_ss")%>
    

    To rename, you can use the operating system command or using the command/UNIX windows and rename the file by adding the getsystdate API.

    Hope this fixes your condition

  • How to rename multiple files in the XP command prompt

    I have several files. I want to Rename these files at once in the command prompt so that these files have become
    some easy to use in some applications.

    name (1) .jpg
    name (2) .jpg
    name (3) .jpg
    name (4) .jpg
    name (5) .jpg
    name (6) .jpg
    name (7) .jpg
    name (8) .jpg
    name (9) .jpg
    name (10) .jpg
    name (11) .jpg
    name (12) .jpg
    name (13) .jpg
    name (14) .jpg

    so I want to rename these files as
    1. jpg
    2.jpg
    3jpg
    4.jpg
    5 jpg
    6 jpg
    7 jpg
    8 jpg
    9 jpg
    10 jpg
    11 jpg
    12 jpg
    13 jpg
    14 jpg

    Please please please... Someone help me to do this...

    Thanking you...
    Jacky, Bangalore.

    create a file like x1.bat

    off @echo
    Set /a counter = 00
    for %% in (*.jpg) called X 2. BAT %%d KB

    -------------------------------------

    Create another file as x2.bat

    off @echo
    call the x 3. BAT

    file%counter%.jpg Ren %1

    -------------------------------------

    Create another file as x3.bat

    off @echo
    Set /a counter = counter % + 1

    --------------------------

    place these files in the directory of the image or file.

    then run the file x1.bat

    who's going to rename all the files in time sequentially.

    I think it will help you to rename several files at once with a dry.

    Thank you once more...

    If a problem occurs, please answer me.
    If I can I'll tell u...

  • How to rename a file based on XMP values?

    I have a file with multiple IDS in the field on the tab information.

    I want to rename the file with the values I have in the fields.

    For example, with file1.psd:

    in the keywords I have: 36607675; 36607675; 20999012; 20999013;

    I want to have 5 files at the end:

    36607675.PSD

    36607675.PSD

    20999012.PSD

    20999013.PSD

    File1.PSD

    I tried to create a script using the ScriptingListener plug-in, but he has no works and the generated code is to be a little difficult to understand. He doesn't take care of the metadata to other files...

    After that I tried to find some tutorials but evryone try to add XMP data, not get it back to use.

    Thanks in advance for your help and best regards

    This should make a folder of PSD in Photoshop...

    It requires Photoshop CS4 or newer!

    #target photoshop
    app.bringToFront();
    main();
    function main(){
    var selectedFolder = Folder.selectDialog( "Please select source folder");
    if(selectedFolder == null ) return;
    var fileList = selectedFolder.getFiles("*.psd");
    for(var a in fileList){
    var Keys = getKeys( fileList[a]);
    for(var k in Keys){
        var copyName = Keys[k] + ".psd";
        fileList[a].copy(File(selectedFolder + "/" + copyName));
        }
        }
    }
    function getKeys( file){
    if ( !ExternalObject.AdobeXMPScript ) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
            var xmpf = new XMPFile( File(file).fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_READ );
            var xmp = xmpf.getXMP();
            var arrItem=[];
        var items =  xmp.countArrayItems(XMPConst.NS_DC, "subject");
        for(var i = 1;i <= items;i++){
            arrItem.push(xmp.getArrayItem(XMPConst.NS_DC, "subject", i));
         }
     return arrItem;
    }
    
  • How can I move files system recovery to the original location?

    I use Windows 7 on a HP Pavilion P6000 series.  I believe that the Recovery Manager created Windows System Recovery Files folder on the C: drive (from .wim files) created on an external drive, and I want to move them to the original location.  Just copy or move everything to the C: drive, or is it an executable program that does this?

    Found this previous post - I guess that's the solution...

    Re: How to restore the system recovery files to their original location? (HP Pavilion p6540F desktop

    201207 04-18: 12:00 - modified on 18-04-201207:13 PM

    The backup that is used to recover only restores the files in a folder, leaving the owner to move. I agree, not the application of backup more useful, but better than nothing I guess.

  • HOW TO FORMAT A FILE SYSTEM RAW PEN DRIVE TO THE FAT32 FILE SYSTEM

    I have an of Sandisk USB key that is formatted by Místek in raw Format, so plaese tell me that how I can convert it from raw to fat 32 System. I await your response.

    Thank you.

    USB and SD drives readers are better formatted with a tool specifically designed for this purpose. HP has a tool with external USB drives in mind and can format FAT32 or NTFS. Looking for a. EXE file downloaded from the Internet can be a bit daunting, so I downloaded the copy I use on my SkyDrive and made available on the link below.

    It is a stand-alone. EXE which requires no installation runs. Note that you need to provide administrator rights to use the above. This provides the elevated permissions necessary for formatting on a Windows 7 system.
    On a related note, DD disks must be formatted with a special formatting tool that keeps the reserved protected area that allows them is set (the S in SD). The best place for an SD card formatting tool is SDCard.org on the link below.

Maybe you are looking for