Rename a file text

Hello,
I would like to rename a file text since a script PL/SQL.
May I have a solution?
Thanks in advance
null

Hi,
U can Use Java to Do That and Write a Java Procedure and Call it In Pl/Sql.
More Help Refere Docs ....
regards,
Ganesh R

Similar Messages

  • Renaming Images from Text File

    Hello,
    I am trying to rename images in a folder to match the names within in a text file. The names in the text file are all unique, so using a rename batch like example-1.jpg, example-2.jpg, etc. won't work. I have matched the structure between both the name and image file, so I need automator to traverse down the text file and add each unique name to the corresponding image.
    If anyone has some help for this it will greatly be appreciated! Thanks

    I wrote you a shell script that will do the job.
    First, put all your images into a folder (if you haven't already done so). Make a copy of the folder for safety's sake (I tested the script and it should work fine, but it's always good to have a backup).
    Now, make sure each new name in the text file is on its own line. Rename the file to "list.txt" and put it in the same folder as the images (better make a copy of the list, too).
    Now, download this file: http://danielrichman.com/tmp/file_rename.sh
    Put it in the same folder as your images.
    Now, open Applications -> Utilities -> Terminal and type the following (without quotes):
    "cd "
    Then open up the Finder window that contains the images. In the title bar of the window, there's a little folder icon. Drag the icon into the Terminal window. (You should see the path copied.)
    Then, in Terminal, press enter.
    Then copy this (and press enter at the end):
    "chmod a+x ./file_rename.sh"
    Then, do this:
    "./file_rename.sh"
    That should be it! Please let me know how it goes.
    Good luck!
    ddr

  • How to do search with multiple texts across documents and rename the file with found text?

    Hello:
    I'm trying to do the batch search across the multiple documents and rename the file (or save as) after the found word?
    In example:
    I have many unique texts and would want to search across the multiple documents.
    If a document is found with that unique text then, the document is either renamed or save as with that unique text. 
    So, I could know what unique text that file holds.
    How do I do that?
    Let me know.
    Thanks

    Welcome to the forum!
    When you want to post a block of code, you can enclose it with the mark ups { code }
    That is the key word code surrounded by curly brackets, but without the spaces
    You seem to be running a very old (and unsupported release of the database)
    7.3 has not been a current release for about 10 years.
    It's probably been that long since I've used this technique, but i think it should work.
    You should consider welcoming your system to the 21st century by upgrading to a supported release ;-)
    If you used split to chop up your export file, use cat or dd to reassemble it.
    So, something like this:
    mknod bk.dmp p
    cat xaa xab xac xad xae xaf xag xah xai > bk.dmp &
    imp SYSTEM/$PASSWD parfile=imp_bk.parfile
    rm bk.dmp
    $ cat imp_bk.parfile
    file=bk.dmp
    log=imp.log
    full=y
    buffer=1048576
    ignore=y
    commit=y let us know if still have problems.
    Good Luck!

  • Renaming a File to File without Mapping

    Hi All,
    I am having a scenario where there is a text file transfer without any conversion i.e. basically a file to file scenario with no mapping. The only requirement is to rename source file which has .csv extn to .dat. For instance if the sender file is XYZ.csv, the file at the receiver side should be XYZ.dat.
    As there is no mapping, I cannot use Dynamic Configuration UDF in mapping. One other option is to write an adapter module which seems too bulky for this small requirement. So as of now I am looking at any option which I can use without having to create IR objects or do text ->XML -> text conversion.
    I hope experts here can help in resolving the current problem and/or give some pointers
    Best Regards,
    Pratik

    > OS Command in File Receiver Channel: mv %f `basename %f .csv`.dat
    I think you should use the full path address, the same as you used for the folder.
    You can also use an adapter module, it is just a couple of lines:
    public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
                          throws ModuleException{
         try {
            Message msg = (Message) inputModuleData.getPrincipalData();
            Payload payload = msg.getDocument();
            String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File","FileName");
            // do something with the filename
            msg.setMessageProperty("http://sap.com/xi/XI/System/File","FileName", fileName);
            inputModuleData.setPrincipalData(msg);
        } catch (Exception e) {
            throw new ModuleException(e);
        return inputModuleData;

  • Renaming a file you already have in file obejct?

    Hi
    I have a file I've already loaded into a var.
    I've made a function that I want to rename the file on the hard drive using moveTo(), so that backup_ is added to the front of the file name:
    myFile.nativePath;
    renameMyFile(myFile);
    public function renameMyFile(filePath:String)
                var original = File.documentsDirectory;
                original = original.resolvePath(filePath);
                var destination:File = File.documentsDirectory;
                destination =  destination.resolvePath("backup_"+filePath);
              original.addEventListener(Event.COMPLETE, fileMoveCompleteHandler);
                original.addEventListener(IOErrorEvent.IO_ERROR, fileMoveIOErrorEventHandler);
                original.moveToAsync(destination);
    private function fileMoveCompleteHandler(event:Event):void {
                    trace(event.target); // [object File]
    private function fileMoveIOErrorEventHandler(event:IOErrorEvent):void {
                    trace("I/O Error."); 
    It keeps tracing "I/O Error."  The new file doesn't already exist, so the error isn't thrown due to it already being there.
    What is the correct way to do this, if you already have the file's nativePath in a string?
    Thanks guys.

    You would be better off using a script to do this as an example as I don't think it would be possible in the Bridge re-name.
    Using ExtendScript Toolkit or a Plain text editor copy the code into either and save it out as Filename.jsx
    This needs to be saved into the correct folder. this is found by going to the preferences in Bridge, selecting Startup Scripts, this will open the folder where the script is to be saved.
    Once this is done close and re-start Bridge.
    To Use: Goto the Tools Menu and select Rename PDFs
    Make sure you test the code with a few copied files into a seperate folder first to make sure it does what you want.
    The script will do all PDF files in the selected folder.
    #target bridge 
    if( BridgeTalk.appName == "bridge" ) { 
    renamePDFs = MenuElement.create("command", "Rename PDFs", "at the end of Tools");
    renamePDFs.onSelect = function () {
    app.document.deselectAll();
    var thumbs = app.document.getSelection("pdf");
    for( var z in thumbs){
    var Name = decodeURI(thumbs[z].spec.name);
    var parts = Name.toLowerCase().replace(/\s/g,'-').match(/(.*)(-)(.*)(-)(.*)(\.pdf)/);
    var NewName = parts[1].replace(/^[a-z]/, function(s){ return s.toUpperCase() });
    NewName += parts[2]+parts[3]+parts[4]+parts[5].toUpperCase().replace(/[A-Z]$/, function(s){ return s.toLowerCase() });
    NewName += parts[6];
    thumbs[z].spec.rename(NewName);

  • Renaming a file in a filechooser

    renaming a file in a filechooser -
    Single click or right click on a folder of a JFileChooser allows you to edit the new file name ina textfield. When the focus is lost from the text field the folder name is changed to the older one. But after editing the file name in the textfield and press 'Enter' the folder or file is updated with the new name. Can anybody tell me if there is a way to make it work on loosing focus ???
    Thanks in advance

    This sounds like a bug from the install. I use Mavericks and do not have this problem. I suggest reinstalling: http://support.apple.com/kb/PH13871

  • Help renaming pdf files based on internal content

    I work for a company that has thousands of E-tickets coming in daily, weekly, monthly, etc..
    These tickets come in bafhakfbaifh.pdf and we have to manually rename them or print them all out and then sort through them and put them in order.
    What I would like to do is:
    1. Split any pdf's that have more than one page or "ticket" in my case. I know how to do this with automator easily, but I'd love to keep it all in one program.
    2. Search the file for Event Name (i.e. Madonna)
    3. Search the file for Date of event (August 12, 2012)
    4. Search the file for Section, Row, Seat (124 3 12)
    5. Rename the file based on content found (Madonna August 12 2012 124 3 12.pdf)
    6. Move from original download folder to organized folders based on artist/team.
    7. Automatically print in alphabetical or some sort of designated order.
    Any help is muchly appreciated. So far, I found a PC program called A-PDF rename, but it is not automated enough to be practical. Hazel is awesome at OCRing the pdf and moving from folder to folder, but does not do enough.
    Any help is muchly appreciated.
    Thank you.

    You're looking for a PDF Parser or PDF miner tool (PDFminer) as a starting framework, and you'll almost certainly be writing custom code around that as parsing a text file that's effectively free-form and originating from multiple different sources almost always (always?) involves writing customized processing code and an on-going series of tweaks as the suppliers of the PDF change their ticket formats.  (Even apparently-simple details such as the time and date formats, for instance, can vary by geography and language and by supplier, and can derail common processing.)
    In some cases that I can envision, it'd be entirely possible that the data you're after is actually located in an embedded image and not in text that can be parsed.
    The best approach is to get folks to send you JSON or XML or some other format intended for interchange, and avoid the whole mess that is parsing or mining a printer-oriented format.
    The other obvious option is to use something like Amazon's Mechanical Turk or some other explicitly outsourced help.  Depending on how often the formats change and how many of these PDF files you're dealing with and how varied the formats are, sometimes throwing staff at the problem can be the most cost-effective approach.

  • Renaming the file

    Hi
    Good Morning friends
    Can anyone help me in this
    I want to select one file from presentation server and rename that file and to be saved in same location.Is there any program,
    guide me friends
    Regards
    Kiran

    Hi Kiran,
    There is a way to rename a file using FM 'GUI_RUN'.
    Create a batch file in the Presentation server and call it by FM 'GUI_RUN'.
    I have developed a small report which will achieve it.
    Just try below code.
    REPORT  zpr_test1.
    TYPES: BEGIN OF ty_itab,
          text(100) TYPE c,
          END OF ty_itab.
    DATA: filetable TYPE filetable,
          rc TYPE i,
          wa_file TYPE file_table,
          ret TYPE i.
    DATA: itab TYPE STANDARD TABLE OF ty_itab,
          wa TYPE ty_itab,
          len TYPE i,
          len1 TYPE i,
          str1 TYPE string,
          str2 TYPE string,
          old_name TYPE string,
          new_name TYPE string,
          filename TYPE string,
          cmd(200) TYPE c.
    DATA: tab_pop  TYPE TABLE OF sval.
    DATA: wa_pop  TYPE sval.
    *Get file name
    CALL METHOD cl_gui_frontend_services=>file_open_dialog
      CHANGING
        file_table = filetable
        rc         = rc.
    READ TABLE filetable INTO wa_file INDEX 1.
    IF sy-subrc = 0.
      wa_pop-tabname   = 'FILE_TABLE'.
      wa_pop-fieldname = 'FILENAME'.
      APPEND wa_pop TO tab_pop.
    *Get new file name in popup
      CALL FUNCTION 'POPUP_GET_VALUES'
        EXPORTING
          popup_title     = 'Enter new file name without extension:'
        TABLES
          fields          = tab_pop
        EXCEPTIONS
          error_in_fields = 1
          OTHERS          = 2.
    ENDIF.
    *Build new file name
    READ TABLE tab_pop INTO wa_pop INDEX 1.
    IF wa_pop-value IS NOT INITIAL.
      new_name = wa_pop-value.
    ELSE.
      new_name = 'New'.
    ENDIF.
    *Build batch file
    ***Build drive name
    wa-text = wa_file+0(2).
    APPEND wa TO itab.
    CLEAR wa.
    ***Build path
    len = STRLEN( wa_file ).
    len1 = len - 1.
    DO len TIMES.
      IF wa_file+len1(1) = '\'.
        wa-text = wa_file+0(len1).
        EXIT.
      ENDIF.
      len1 = len1 - 1.
    ENDDO.
    CONCATENATE 'CD' wa_file+0(len1) INTO wa-text SEPARATED BY space.
    APPEND wa TO itab.
    CLEAR wa.
    ***Build old file name
    str1 = wa_file.
    WHILE str1 CA '\'.
      SPLIT str1 AT '\' INTO str1 str2.
      str1 = str2.
    ENDWHILE.
    old_name = str1.
    str1 = wa_file.
    CLEAR str2.
    ***Build extension for file
    WHILE str1 CA '.'.
      SPLIT str1 AT '.' INTO str1 str2.
      str1 = str2.
    ENDWHILE.
    IF old_name CA space.
      CONCATENATE '"' old_name '"' INTO old_name.
    ENDIF.
    IF new_name CA space.
      CONCATENATE '"' new_name '"' INTO new_name.
    ENDIF.
    CONCATENATE 'RENAME' old_name new_name INTO wa-text SEPARATED BY space.
    CONCATENATE wa-text '.' str1 INTO wa-text.
    APPEND wa TO itab.
    CLEAR wa.
    *Give name for batch file
    CONCATENATE wa_file+0(len1) '\' 'TEST1.bat' INTO filename.
    *Download batch file to Presentation server
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
        filename = filename
      CHANGING
        data_tab = itab.
    cmd = filename.
    *Call the batch file to rename the file
    CALL FUNCTION 'GUI_RUN'
      EXPORTING
        command    = cmd
      IMPORTING
        returncode = ret.
    Thanks..

  • Shoot Name becomes "Untitled Shoot" when renaming a file.

    I use "ShootName"."CustomText"_"FileNumber" when importing my files.  This is great!
    However when I use the "F2" method of renaming my files my "shootname" becomes "untitled shoot" and my FileNumber disappears. 
    The Custom Text field shows up for editing, but the Shoot Name field is not there. Also, what happened to the FileNumber? It's as though it wants to start a sequence instead of respecting the original FileNumber.
    This makes "rename photo" not work for me.  I have to use the "Change filename in Exif" method that I just learned.
    Will people who use the "Rename Photo" option tell me how this tool is useful for them? I'm wondering if I just don't know how things are supposed to work.
    (I just learned about changing the filename in exif).
    Or is this a bug where we can look forward to a fix?
    Thanks!

    I use the rename photo on import option as well.  either "mb_date_filename.ext" or "mb_date_custom text_filname.ext".
    The thing with the F2 rename option is that if you've already renamed the image on import then certain information like "original file number" will not be available in the rename option the second time through.  exif info like iso or focal length will still be there as well as any iptc data you add on import.
    It will use "mb_date_filename" as the "filename" in any preset you have created. 
    Is shootname custom text that you entered on import?
    I wish it could pull the original file number on a second rename as well.

  • JDeveloper Freezes when renaming a file

    I am experiencing a problem whenever I try to rename a file, JDeveloper freezes....
    If anyone encountered this and overcame it please advise
    Thanks in advance
    Ajith

    Hi,
    Go to iChat Menu > Preferences > Accounts section and deselect the Use this Account option to log out
    Go to the Server Settings tab and change the port to 443.
    Log back in again.
    Also make sure port 5190 On the UDP Protocol (if specified) is allowed in any routing device.
    iChat uses port 5190 on the TCP Protocol by default to Login and do certain Text chats.
    It uses the same port but on the UDP Protocol for Direct Chats (With Pics in them) and Sending Files and certain Info to the Buddy Lists from the servers.
    Some modems particularly Zyxels do not like the fact the port is used twice in this way.
    Other devices that now include Protocols with Port Forwarding also have issues with this.
    Moving the Login port is a part step but the UDP Protocol still needs to be allowed on port 5190
    9:56 PM Friday; April 3, 2009

  • Batch Rename Multiple files with different names

    Hi,
    Is there any way to batch rename multiple files with individual names? I.e
    IMG_123 changed to  RSP45AS
    IMG_124 changed to MOL157A
    IMG_125 changed to AGKH135
    IMG_126 changed to MNOLH13
    IMG_127 changed to ASFBLUG
    Etc.
    Are they any programs or scripts or plug ins that would do that job?
    Thanks

    HI there Onemorewave,
    It looks like there is a batch remname feature included in OS X 10.10 Yosimte if you are planing on updating. 
    Rename files, folders, and disks - Mac Help
    Rename multiple items
    Select the items, then Control-click one of them.
    In the shortcut menu, select Rename Items.
    In the pop-up menu below Rename Folder Items, choose to replace text in the names, add text to the names, or change the name format.
    Replace text: Enter the text you want to remove in the Find field, then enter the text you want to add in the “Replace with” field.
    Add text: Enter the text to you want to add in the field, then choose to add the text before or after the current name.
    Format: Choose a name format for the files, then choose to put the index, counter, or date before or after the name. Enter a name in the Custom Format field, then enter the number you want to start with.
    Click Rename.
    Note: To batch rename, you would want to choose the "Format" option.
    -Griff W

  • Renaming audio files with increasing numbers.

    I don't know if this is a Logic or a MacOS question but since it has to do with music I post it here.
    I received three Cds with audio files. Every CD starts from track number one. I want to import all that files into logic. It confuses me when I have three audio files with the same name in my audio window. I want to rename them so I can see to which CD they belong.
    I could rename all the files manually. But is there a way to rename the files with increasing numbers all at once?
    Can I do that with the file manager or automator??
    Thanks for help,
    Eddie

    Hi
    what i do is import the files in Logic.
    In the arrange window select all the different regions (i only have done this when they're on the same track).
    Select the text tool.
    click on the first track you wanna rename - a blue box will appear.
    type the preferred name with a 1 after it.
    all the regions following that region will be renamed incrementally.
    You can also do this with a single region that you have split in logic.
    Or you can split a region in logic and to rename them as individual files i press ctrl-F and ask logic to save them as "xxxfile1" - or with out the "1" i can't remember - and it saves them all incrementally.
    Hope this helps
    Rounik

  • How can i bulk rename music files in reverse order from artist - song name to songname - artist

    How can I bulk rename music files in reverse order from artist - song name to songname - artist.
    I actually dont need to rename the actual files.
    Its just i have a huge txt list of 100,000 music names that are listed as so..
    Artist - Song Name
    Artist - Song Name
    Artist - Song Name
    Artist - Song Name
    Artist - Song Name
    Artist - Song Name
    and i need this list to reverse it self so it is listed in the list as
    Song Name - Artist
    Song Name - Artist
    Song Name - Artist
    Song Name - Artist
    Song Name - Artist
    Song Name - Artist
    Song Name - Artist
    Im sure there is some kinda way to auto a mix of applescript/automator/terminal to do something like:  all char before the "-" replace with the chars after the "-".
    Please some one help me if you know how I can pull this off

    How can I bulk rename music files in reverse order from artist - song name to songname - artist.
    I actually dont need to rename the actual files.
    Its just i have a huge txt list of 100,000 music names that are listed as so.
    I wonder if we haven't misunderstood what you were asking for. Could it be that you have not a huge file, but just a huge list of names in many small files. If that's the case, you should rather use the following script instead of the previous one.
    Since this script does not rename the files, make a backup of your files before running it.
    set theFolder to choose folder -- the folder containing your text files
    tell application "Finder"
        set theNames to name of files of theFolder whose name extension is "txt"
    end tell
    set theTextFiles to {}
    set theFolderPath to POSIX path of theFolder
    repeat with thisName in theNames
        copy theFolderPath & thisName to the end of theTextFiles
    end repeat
    repeat with thisFile in theTextFiles
        set F1 to open for access thisFile
        set theText to read F1
        close access F1
        set theParagraphs to paragraphs of theText
        set bigList to (a reference to theParagraphs)
        set theNewParagraphs to {}
        set bigNewList to (a reference to theNewParagraphs)
        repeat with X in bigList
            set P to offset of " - " in X
            if P = 0 then
                set Y to X
            else
                set Y to text (P + 3) through -1 of X & " - " & text 1 through (P - 1) of X
            end if
            copy Y & return to the end of bigNewList
        end repeat
        set theNewText to text 1 through -2 of (bigNewList as text)
        set F2 to open for access thisFile with write permission
        set eof F2 to 0
        write theNewText to F2
        close access F2
    end repeat
    display dialog "Done!" buttons {"OK"} default button 1 with icon 1
    Message was edited by: Pierre L.

  • RECOVER RENAMED KEYNOTE FILE

    Hello,
    My mistake:
    im new to keynotes and its icloud, and figured it would work like dropbox.
    I finished my 6 hours keynote session.
    So, working on Keynotes and the file in Cloud, i decided to make a stripped version of less MB by deleting slides.
    Renamed the file, moved the file to my desktop, and started deleting images and sensitive text slides
    Than I realised, i might have not been back-uped from icloud.
    PROBLEM
    file not in Icloud anymore
    half of my keynote file stripped, and cannot undo anymore
    looked on discussions for hours, no real solutions yet
    Also file not in "HIDDEN" Library/mobile documents...
    Status: all software updated.
    Downloaded: Diskdrill
    Found: file00075.db3 file (could be about the size of my file)
    Issue: cannot retrieve the file, even just the text back im already happy
    QUESTION:
    is there any way:
    1) Icloud somehow has a backup of a file that is moved from icloud to desktop?
    2) once the files was fully on the desktop, but was renamed and closed, is  there no temp file? How to find?
    3) how can i open this *.db3 files, or even, how to find them back in finder?
    I fear the worst...
    Thanks

    Just happened to my  lost 12 hours of work,  been saving just fine all day then WHAM.

  • Import; Rename Master File; Why Isn't It Red?

    Importing an image.
    Choose Rename Files, Version Name: Custom Name with Index
    Enter: Custom Name Text
    Check: Rename Master Master File
    Show: File Info
    Version Name looks to be correct. It has the custom name I entered and an index number and it's red indicating I've changed the Version name.
    Why is the File Name not the same as the Version name? I checked Rename Master File.
    Why isn't the File Name red? I'm changing it?
    After I import the files, I checked the Metadata and it appears the File Name is correct.
    Is this a bug in Aperture?
    Or am I missing something?

    I'm having the same problem.
    Gosh, I hope somebody comes along and helps us out on this.
    Regards,
    2 Open Loop

Maybe you are looking for

  • TS5275 When will the Garageband 10 InApp Purchase be available?

    i did my research i called in and i have been told the in-app purchase will soon be available.  does anyone know when? until now at least a lot of people dont seem to be able to purchase anything.

  • Exorbidant toll free call charges - no avenue prov...

    I just noticed my account funds dropped sharply after a 'toll-free' 1300 call to Australia - it was over 4.5 euros for a short call. This is surprising - especially after I just paid for a 100 min 'subscription' to Australian mobiles and landlines. W

  • !ApolloLaunchDelegate.cannotFindProject! error when running air application from ide.

    Hi, I'm using the plugin version of flash builder 4 and when trying to debug/execute I get an !ApolloLaunchDelegate.cannotFindProject! error :/. Do anybody know what's happening or how I could solve this? I've been working with this for web applicact

  • Calling by reference

    I'm usually a C++ programmer, and I heard that Java and C++ were alot alike. I tried to call some variables in a function by reference, but it didn't work. I tried calling it like: public static void changer(int &num) num = num * num; I guess java do

  • Lost Sync Data

    Hi All, Please help me, I got a new work-laptop a couple of days back and installed the BB desktop manager on it. I then synced with our company Outlook for the first time since three months yesterday and now all the data on my phone has been replace