Powershell to rename file based on output

Good Afternoon
I was wondering if someone could assist with the below
1. We currently have a system in place whereby a document is scanned onto the system as an image and this is saved in a central location folder
2. I then run tesseract within powershell on this location folder, which is a program that can extract the image to txt file and this converts the image to a txt file and saves in the same location with the same name
3. What i would like to do is for powershell to then search the extracted txt file and look for a particular regexpression (which i have) and to then rename the original file from point 1 to the output
Is the above possible at all
This is what i have so far, what this seems to do is look in my ocr folder and run tesseract and the output txt files end up in the same folder
$TargetFolder1 = “c:\ocr\test\file.txt”
$regex = '[0-9]{5,6}[\.][0-9]{0,1}'
$result = out-file ("c:\OCR\Match\""imtest" + ".txt")
select-string -Path $Targetfolder1 -list -Pattern $regex | % { $_.Matches } | % { $_.Value } > $_result
cd "C:\Program Files (x86)\Tesseract-OCR"
Apologies of it seems confusing
Barrie

Hi
Many thanks for the info so far, much appreciated
I have read around on the Microsoft Powershell learning site but becoming slightly confused with some more piping
I previously mentioned that the tesseract program converts the ocr scanned tif file into a text file - Is it possible instead to have this output to a variable of some sort and then for my reg expression carry out the search in the variable and
then rename the tif file based on the result of the regexpression
Previously i have ran tesseract on a tif file via powershell which in turn produces a text file of the document in the file location
I think it would be best if i ran tesseract on the tif file, then for powershell to export the results somewhere and the reg expression query can be run and the final result will rename the original tif file with the output of the reg expression
Hope this makes sense and many thanks for help so far
Regards
Barrie

Similar Messages

  • Renaming files based on sequence

    I have a set of 3 images for an MxN pixels of certain scan.
    I have developed a code that does some image processing and renames the files as pulse-1, pulse-2 and background-1. This is for 1 pixel. Right now I can do this to only the three images that relates to One pixel that I used for testing.
    In futures I will be having MxN images, which means MxN pixels and I have MxNx3 images, how can I sequentially rename the files based on which pixel it corresponds to ? for ex: Pixel-1_Pulse1, Pixel-1_Pulse2 and Pixel-1_Background.
    The developed code for 3 images is attached.
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]
    Attachments:
    Image intensity - DEV-9.vi ‏38 KB

    Well, the tools are "strip path", "build path", and "get file extension". The rest are simple string operations on the filename.
    Sorry, it is not clear what exactly you are trying to do. Is each pixel a seperate image file? You seem to list all BMPs in a folder, but then only look at three files.
    Can you show an example file list and what kind of output you expect from it?
    (In the meantime, you really should do a few more tutorials. learn about autoindexing (first loop). Also don't convert the path to a string only to convert it back to what it was a few nanoseconds later. The "array to cluster...unbundle dance" is just silly. Simply use index array resized to three output. See attached).)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Image intensity - DEV-9-MOD.vi ‏29 KB

  • How can I automatically rename files based on an excel doc?

    I am a scientist and recieve data files from some of my experiments with arbitrary, computer-generated names. For example, if I perform an experiment with four samples, which I name Sample1, Sample2, Sample3, and Sample4, I get back 4 data files named J30935D05.ab1, J30935E05.ab1, J30935F05.ab1 and J30935G05.ab1 along with an Excel doc that lists my names for the samples (sample1, sample 2, etc.) in one column and the computer-generated names for their corresponding files (J30935D05.ab1, J30935E05.ab1, etc.) next to them in another. Therefore, I must open the Excel file and look up which file corresponds to which sample before I can begin processsing my data. Usually these experiments involve a large enough number of samples (70-100 or so) such that looking everything up in the Excel doc gets very tedious and is quite time-consuming. Is there any way to create an automator workflow, applescript, or some other solution to rename these files based on the Excel doc? To clarify, I would like an automator workflow that would take a folder of arbitrarily named files, look up the names I have for the samples in the Excel doc, and rename the files accordingly. In the example, my folder containing files J30935D05.ab1, J30935E05.ab1, J30935F05.ab1 and J30935G05.ab1 would be turned into a folder containing the files renamed as Sample1.ab1, Sample2.ab1, Sample3.ab1, and Sample4.ab1. This example is a bit simplified, however, and trying a simple trick of just systematically renaming files within the folder would not work--both the original and the new file names must be looked up in the Excel doc, as these change dramatically from experiment to experiment. I would also need to maintain the file extension on each file after being renamed. Any help would be greatly appreciated!!

    Try the freeware utility Renamer4Mac (VersionTracker or MacUpdate).
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • HowTo Rename file based on message content?

    Hi All,
    Newbie here.
    I have an message which i'm pushing out to a file via a File eWay.
    I need to name\rename the file based on the ID of the message.
    What is the best way to do this?
    Thanks,
    Ken

    I'm not aware of a way to do this via the File eWay, which is very limited in functionality. Of course, you could do it with standard java.io but that isn't very Java EE. So, I typically use the Batch eWay (Batch Local File) where more robust capabilities such as this are quite easy using the dynamic configuration features.

  • Need a script to do the following... rename files based on folder name...

    Hi. Macophile just starting to tread the waters of Applescript, trying to use Automator but don't think it will do what I need.
    I have many images stored with-in folders that I would like to extrapolate a given number of characters from the folder name and Add Text to the files within those given folders.
    Basically...
    Folder name is C00100_Descriptive
    Files within folder are just Descriptive_01, Descriptive_02
    Would like to make all files within a given folder take the first 7 characters from the folder and Add that text to all files and files within subfolders of that folder to make the resulting files shown as...
    C00100Descriptive01
    C00100Descriptive02
    Along with this I would also like to incorporate into the script, an added step to create Thumbnail jpegs of the image files in a Subfolder under C00100_Descriptive folder.
    I can see how to do that in automator but not specifying parameters such as taking a certain number of characters from the folder the file resides in and adding that selected text to the files.
    Ideally I would like a droplet or something that I could take a bunch of folders and drop them on the droplet to perform these actions.
    Any advice, help or guidance would be really helpful! Thanks in advance.

    Awesome, you're quite welcome, glad to hear it worked for ya!! Here's another version of the script that will rename the thumb files as jpg...
    <pre style="width:630px;height:auto;overflow-x:auto;overflow-y:hidden;"
    title="Copy this code and paste it into your Script Editor application.">on run
    set theItems to choose folder with multiple selections allowed
    open (theItems)
    end run
    on open (itemList)
    repeat with anItem in itemList
    set theInfo to info for anItem
    --VERIFY THAT THE OPENED ITEM IS A FOLDER
    if folder of theInfo and not package folder of theInfo then
    --SET PATH TO THE FOLDER
    set theFolder to POSIX path of anItem
    --GET FIRST PART OF FOLDER NAME
    set folderNameStart to do shell script "echo " & ¬
    quoted form of (name of theInfo) & "|awk -F'_' '{print $1}'"
    --GET ALL FILE NAMES
    set fileList to list folder anItem without invisibles
    --PROCEED IF FOLDER NOT EMPTY
    if fileList is not {} then
    --SET PATH TO THUMBNAIL FOLDER
    set thumbFolder to theFolder & "_thumbs/"
    --CREATE FOLDER IF IT DOESN'T ALREADY EXIST
    try
    do shell script "mkdir " & quoted form of thumbFolder
    end try
    --PROCESS FILES
    repeat with fileName in fileList
    --SET PATH TO CURRENT FILE
    set oldFile to theFolder & fileName
    --PROCEED IF FILE IS NOT A FOLDER
    set oldFileInfo to info for POSIX file oldFile
    if not folder of oldFileInfo then
    --SET NEW FILE AND THUMB FILE PATHS
    set newFileName to folderNameStart & "_" & fileName
    set newFile to theFolder & newFileName
    set theExt to name extension of oldFileInfo
    set thumbName to text 1 through -((length of theExt) + 1) of newFileName & "jpg"
    set thumbFile to thumbFolder & "thumb_" & thumbName
    --RENAME FILE
    do shell script "mv " & quoted form of oldFile & space & ¬
    quoted form of newFile
    --CREATE THUMBNAIL
    --REPLACE '128' WITH MAX HEIGHT OR WIDTH OF THUMB
    try
    do shell script "sips -s format jpeg -s dpiHeight 72 -s dpiWidth 72 -Z 128 " & ¬
    quoted form of newFile & " --out " & quoted form of thumbFile
    end try
    end if
    end repeat
    end if
    end if
    end repeat
    end open</pre>

  • Is there a way to rename files based on ID3 tags? Or, is it possi

    to move the files to my computer in another manner that will name them correctly? I couldn't find an option in the Creative Mediasouce program that would allow me to do this.
    I have most of my music files on my desktop pc, but want to move them to my laptop. I can use Nomad Explorer to pull them onto my laptop and they retain the id3 tag info, but are simply named by the title of the song. This makes it so that the songs are in alphabetical order in the new folder... I would rather not have to rename them adding a track number to each one as I will be transferring many files.
    Thank you very much!

    Well the ID3 tags are fine, as they were correct on the Zen Touch. My problem is just that when you drag-and-drop them from the player to the desktop of the computer, the file name given is only the title of the song (i.e. not track or artist or ablum info.). If there was a way to do it, I would like to change this 'track only name' into at least a 'track number - track name' so that the files are in the correct order for the album in the folder. I thought that this would be easy because the information is already stored in each track's ID3 tag, but I can't figure out how to use this to my advantage. Thanks for your help and sorry if this is confusing.

  • Apple Script to rename files based on a style

    Hi I want to rename many files so they can uploaded to my website.
    In order for them to be uploaded they must be formatted in the following way.
    Firstname=Lastname=lab=summary
    I would input the firstname, lastname and summary for each file as that info is unique. Every file name's style will be the same. the first letter capiatlized in Firstname and Lastname and "lab" in non caps. there is also a "=" between all the words, no spaces.
    Is it possible to make an applescript program where I can drop the files in to the program and have a form open asking me to complete the FIrstname, Lastname and SUmmary fields while filling in the rest?
    Thanks in advance for any help.

    I'm confused about the details of the request.  can you describe the process more clearly? 

  • How can I rename files based on their ID3 tags?

    For example I would like to rename the files in a particular folder to have the format <track number> - <track name>.mp3
    I'd rather not used third party software to do this.

    For example I would like to rename the files in a particular folder to have the format <track number> - <track name>.mp3
    I'd rather not used third party software to do this.

  • 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.

  • Question - rename pdfs based on bookmarks in the files

    I am totally new to javascript (have done some visual basic and other old-school programming).  I am scanning years of paper filing to searchable pdfs, and want to automate one important part of the process.  I suspect that what I need is fairly simple if you know javascript, but for me would be a big learning curve.
    What I would like is a script that will
    look at all the existing pdfs in a folder that I can specify each time the script is run
    each pdf will already have one or two bookmarks (some will only have one; none will have more than two)
    rename the file, using the first (or only) bookmark as the filename
    change the create-date of the file, using the second bookmark as the date
    save the file(s) in a new subfolder under the original folder - folder name unimportant
    If the date is too problematic, then it is optional (the bookmark would be 'dumb' text, and the date format wouldn't be guaranteed the same for each) .
    I've never run a script before, so please give (or point me to) the real basics, like, where do you save a script and run it from there -- all the ignorant questions!
    Thanks in advance to anyone who can help.

    Acrobat JavaScript cannot do most of those things. It has no access to foldera, and cannot rename files. There are two creation dates (on on the file like any other file, one stored inside the file) and it won't do either of them either.

  • Renaming files with invalid characters in their names on NTFS partitions, introduced by operating systems other than Windows

    Essentially, Linux created some files with colons (:) in the name on a NTFS partition where I have Windows installed. I have since uninstalled Linux, but now I can only view these files in Windows Explorer. I can't open them, I can't even rename them to
    correct the problem. It's as if they don't exist, because of the invalid search paths.
    If I try to rename them in Windows Explorer I get following message.
    The file name you specified is no valid or too long.
    Specify a different file name.
    Well isnt' that something?... isn't that nice? Windows is able to display these files, but it doesn't allow me to open them and it certainly doesn't like me to rename them. So why is it whining about it then, when I'm trying to help? It says "try a different
    file name". Yeah, right! Like I haven't tried that one already! It doesn't matter what file name I input it will never accept it.
    So what am I supposed to do now? Ditch Windows and go back to Linux? Surely, Microsoft doesn't like the sound of that. Sure, I could reinstall Linux or run a Linux live system to correct the problem. But what good is Windows then? I might as well switch to
    Linux altogether.
    After doing some research I now know by fact that it's (kind of) possible to rename files from UNIX and UNIX-like operating systems to those compliant with Windows by using something called file name character translation. To some level this is essential and
    necessary for Windows interoperability with other operating systems (Windows is not the only operating system in the world). But this seems to be very complicated and I can't get my head around it. My brain is in overload. I don't know where to start.
    Once there was a...
    There's the Windows Services for UNIX (SFU) 1.0, 2.0, 3.0, 3.5. The first two versions were based on MKS Toolkit, a package licensed by Microsoft from MKS Inc. The later versions were based on the similar Interix product, after Microsoft purchased the company
    that made it.
    Then there's the new Subsystem for UNIX-based Applications (SUA). These are services for UNIX components. They are supposed to have Client for NFS v3 included as well. But the server components from the SFU line is missing (e.g. Server for NFS). These are included
    in Server editions of Windows.
    Then there's the Microsoft Knowledge Base article
    289627: "How to Enable File Name Character Translation". This article seems to describe exactly my situation.
    Windows and UNIX operating systems have restrictions on valid characters that can be used in a file name. The list of illegal characters for each operating system, however, is different. For example, a UNIX file name can use a colon (:), but a Windows
    file name cannot use a colon (:). If a UNIX user attempts to create a file with a Windows illegal character on a Windows Services for UNIX network file system (NFS) share, the attempt is unsuccessful and the UNIX client computer receives an input or output
    error.
    It goes further than that. At first glance, this KB article also seems to offer a solution to this exact problem, with examples as shown below.
    For example, the following maps the UNIX colon (:) to a Windows dash (-):
    0x3a : 0x2d ; replace client : with - on server
    I checked these values in charmap.exe and they are correct. Except for 2D not being a "dash", it's rather a hyphen ("hyphen minus" to be exact), but these two have pretty much the same appearance and they get interchanged a lot, I'm sure
    they are used to it by now. (Yes, the characters! They don't mind.)
    Then there's this registry key.
    HKEY_LOCAL_MACHINE\Software\Microsoft\Server For NFS\CurrentVersion\Mapping
    Well, of course, I don't have Server for NFS. So this is a dead end. Well, actually, it was a dead end from the beginning...
    1. First of all, I'm not working with a network share on a NAS or SAN storage. The files are on the local disk drive where Windows is installed, so that's a DAS for you.
    2. I don't have SFU! Well obviously, I'm on Windows Vista! So that means SUA!
    3. SUA are service components only. No server components. Can you guess what that means? Yeah... no "Server for NFS" since it's a server component.
    4. Windows Vista is a client side operating system! Server for NFS is only offered for use with Windows Server systems.
    5. Back to square one!
    So there you have it. They all lived happy for the rest of their lives...
    I'm stuck here. Can someone tell me what to do? I mean beyond the obvious option to use Linux to fixa a Windows problem? The NTFS file system itself supports colons in file names. It's Windows that doesn't, and so by default it proclaims it invalid character.
    Surely, even a Windows client operating system like Windows Vista should be able to allow the user to at least rename files with invalid characters to something more sensible (from the system point of view) and valid, if not being able to open them as they
    are. Just add some crazy voodoo code to it and it will work. If you can make it possible on Windows Server with UNIX user-mode subsystem on NT kernel, then what's stopping you from giving the Windows client system the same benefit?
    So what now? Purchase a Windows Server 2012 R2 license, copy my invalid files to a NAS share with NFS on a UNIX or Linux system, and have a go at the Windows registry and Server for NFS? Yeah... you're right, it's probably a bit over the top...
    On a second thought... I might as well install Linux again. There are countless situations where Linux has helped me solve problems related to, and more often than not caused by Windows.

    Essentially, Linux created some files with colons (:) in the name on a NTFS partition where I have Windows installed. I have since uninstalled Linux, but now I can only view these files in Windows Explorer. I can't open them, I can't even rename them to
    correct the problem. It's as if they don't exist, because of the invalid search paths.
    If I try to rename them in Windows Explorer I get following message.
    The file name you specified is no valid or too long.
    Specify a different file name.
    Well isnt' that something?... isn't that nice? Windows is able to display these files, but it doesn't allow me to open them and it certainly doesn't like me to rename them. So why is it whining about it then, when I'm trying to help? It says "try a different
    file name". Yeah, right! Like I haven't tried that one already! It doesn't matter what file name I input it will never accept it.
    So what am I supposed to do now? Ditch Windows and go back to Linux? Surely, Microsoft doesn't like the sound of that. Sure, I could reinstall Linux or run a Linux live system to correct the problem. But what good is Windows then? I might as well switch to
    Linux altogether.
    After doing some research I now know by fact that it's (kind of) possible to rename files from UNIX and UNIX-like operating systems to those compliant with Windows by using something called file name character translation. To some level this is essential and
    necessary for Windows interoperability with other operating systems (Windows is not the only operating system in the world). But this seems to be very complicated and I can't get my head around it. My brain is in overload. I don't know where to start.
    Once there was a...
    There's the Windows Services for UNIX (SFU) 1.0, 2.0, 3.0, 3.5. The first two versions were based on MKS Toolkit, a package licensed by Microsoft from MKS Inc. The later versions were based on the similar Interix product, after Microsoft purchased the company
    that made it.
    Then there's the new Subsystem for UNIX-based Applications (SUA). These are services for UNIX components. They are supposed to have Client for NFS v3 included as well. But the server components from the SFU line is missing (e.g. Server for NFS). These are included
    in Server editions of Windows.
    Then there's the Microsoft Knowledge Base article
    289627: "How to Enable File Name Character Translation". This article seems to describe exactly my situation.
    Windows and UNIX operating systems have restrictions on valid characters that can be used in a file name. The list of illegal characters for each operating system, however, is different. For example, a UNIX file name can use a colon (:), but a Windows
    file name cannot use a colon (:). If a UNIX user attempts to create a file with a Windows illegal character on a Windows Services for UNIX network file system (NFS) share, the attempt is unsuccessful and the UNIX client computer receives an input or output
    error.
    It goes further than that. At first glance, this KB article also seems to offer a solution to this exact problem, with examples as shown below.
    For example, the following maps the UNIX colon (:) to a Windows dash (-):
    0x3a : 0x2d ; replace client : with - on server
    I checked these values in charmap.exe and they are correct. Except for 2D not being a "dash", it's rather a hyphen ("hyphen minus" to be exact), but these two have pretty much the same appearance and they get interchanged a lot, I'm sure
    they are used to it by now. (Yes, the characters! They don't mind.)
    Then there's this registry key.
    HKEY_LOCAL_MACHINE\Software\Microsoft\Server For NFS\CurrentVersion\Mapping
    Well, of course, I don't have Server for NFS. So this is a dead end. Well, actually, it was a dead end from the beginning...
    1. First of all, I'm not working with a network share on a NAS or SAN storage. The files are on the local disk drive where Windows is installed, so that's a DAS for you.
    2. I don't have SFU! Well obviously, I'm on Windows Vista! So that means SUA!
    3. SUA are service components only. No server components. Can you guess what that means? Yeah... no "Server for NFS" since it's a server component.
    4. Windows Vista is a client side operating system! Server for NFS is only offered for use with Windows Server systems.
    5. Back to square one!
    So there you have it. They all lived happy for the rest of their lives...
    I'm stuck here. Can someone tell me what to do? I mean beyond the obvious option to use Linux to fixa a Windows problem? The NTFS file system itself supports colons in file names. It's Windows that doesn't, and so by default it proclaims it invalid character.
    Surely, even a Windows client operating system like Windows Vista should be able to allow the user to at least rename files with invalid characters to something more sensible (from the system point of view) and valid, if not being able to open them as they
    are. Just add some crazy voodoo code to it and it will work. If you can make it possible on Windows Server with UNIX user-mode subsystem on NT kernel, then what's stopping you from giving the Windows client system the same benefit?
    So what now? Purchase a Windows Server 2012 R2 license, copy my invalid files to a NAS share with NFS on a UNIX or Linux system, and have a go at the Windows registry and Server for NFS? Yeah... you're right, it's probably a bit over the top...
    On a second thought... I might as well install Linux again. There are countless situations where Linux has helped me solve problems related to, and more often than not caused by Windows.

  • Best Mac video converter (file based) - Search is down...

    Greetings,
    I was planning on doing a search, but it's down at this time...
    I'm looking for what's considered to be the best and most flexible file based video converter for the Mac. I need to convert VCD's to a format iMovie 08 can edit to output a DVD (yes, yes, I'm aware of quality between the two, this is what my friend needs...)
    With the same software I'd like to do all of the fancy conversion file to file be it FLV, MOV, DAT, MPEG etc.
    I've been looking at Aimersoft, iSkysoft, and Video Converter for Mac so far.
    Any suggestions and personal experience would be wonderful!

    There seems to be no need to rename the file extension. I just selected the file from inside the VCD folder and was recognized as a video file.
    It's currently converted, but looks glitchy (not on the original). Maybe this is just a product of playing a high demand file on my MacBook?

  • Pick up Files based on Timestamp???.

    HI All,
    Is it possible to pick up the files in the order of which they are put in a shared folder ?.
    Our client system will put the xml files in a shared folder with timestamps..PI will pick these files one by one..but if the PI server is down.. the files will keep coming in the shared folder from the client system..and when PI come back up they need to be picked in the order in which they have been put according to timestamp.
    I'am using the NFS functionality.
    I dont want to output files from PI based on timestamp added.. I want to pick files up based upon sender timestamp.
    Is this funcationality supported in PI?.
    Thanks.

    HI
    You can write script to do this. Script can copy files based on time stamp from the folder where client system is putting the file to the folder PI is poling based on timestamp.
    With this as Ratan said. If the file creation date for file system is in date and time format(timestamp) File processing sequence by Date can help. It process file starting from oldest file.
    Thanks
    Gaurav

  • JPS-06514: Opening of file based keystore failed.

    I have a fresh install of JDeveloper 11.1.2.3.0 (Build JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1). When I try to start the integrated WebLogic Server from the Application Servers explorer tab, it fails and crashes with "JPS-06514: Opening of file based keystore failed." The entire output console content is pasted below for your reference. I am under time pressure, so the sooner somebody can help, the better. Thanks in advance!
    *** Using HTTP port 7101 ***
    *** Using SSL port 7102 ***
    C:\Users\userP\AppData\Roaming\JDeveloper\system11.1.2.3.39.62.76.1\DefaultDomain\bin\startWebLogic.cmd
    [waiting for the server to complete its initialization...]
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m
    WLS Start Mode=Development
    CLASSPATH=C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\Oracle\MIDDLE~1\patch_wls1211\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\patch_oepe101\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\JDK160~3\lib\tools.jar;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\weblogic.jar;C:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_12.1.1.0.jar;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\webservices.jar;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\Oracle\MIDDLE~1\WLSERV~1.1\common\derby\lib\derbyclient.jar;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\xqrl.jar;.;c:\oracle\middleware\wlserver_10.3\server\lib;M:\dommgr\DomainManager\classes;M:\3rdparty\wls_10.3\weblogic.jar;M:\3rdparty\wls_10.3\wlfullclient.jar;M:\3rdparty\wls_10.3\wljmxclient.jar;M:\3rdparty\wls_10.3\wlclient.jar;
    PATH=C:\Oracle\MIDDLE~1\patch_wls1211\profiles\default\native;C:\Oracle\MIDDLE~1\patch_oepe101\profiles\default\native;C:\Oracle\MIDDLE~1\patch_ocp371\profiles\default\native;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\native\win\32;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\bin;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.1\bin;C:\Oracle\MIDDLE~1\JDK160~3\jre\bin;C:\Oracle\MIDDLE~1\JDK160~3\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\IBM\RationalSDLC\ClearCase\bin;C:\Program Files\IBM\RationalSDLC\common;M:\etc;C:\Oracle\MIDDLE~1\WLSERV~1.1\server\native\win\32\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    java version "1.6.0_29"
    Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
    Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode)
    Starting WLS with line:
    C:\Oracle\MIDDLE~1\JDK160~3\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=DefaultServer -Djava.security.policy=C:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\weblogic.policy -Djavax.net.ssl.trustStore=C:\Users\FCOCA~1.COR\AppData\Local\Temp\trustStore7654511046496503013.jks -Ddmsc_config_file=M:\etc\dommgr.properties -Doracle.jdeveloper.adrs=true -Dweblogic.nodemanager.ServiceEnabled=true -Xverify:none -Djava.endorsed.dirs=C:\Oracle\MIDDLE~1\JDK160~3/jre/lib/endorsed;C:\Oracle\MIDDLE~1\WLSERV~1.1/endorsed -da -Dplatform.home=C:\Oracle\MIDDLE~1\WLSERV~1.1 -Dwls.home=C:\Oracle\MIDDLE~1\WLSERV~1.1\server -Dweblogic.home=C:\Oracle\MIDDLE~1\WLSERV~1.1\server -Djps.app.credential.overwrite.allowed=true -Dcommon.components.home=C:\Oracle\MIDDLE~1\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=C:\Users\FCOCA~1.COR\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1 -Djrockit.optfile=C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.server.config.dir=C:\Users\FCOCA~1.COR\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\config\FMWCON~1\servers\DefaultServer -Doracle.domain.config.dir=C:\Users\FCOCA~1.COR\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\config\FMWCON~1 -Digf.arisidbeans.carmlloc=C:\Users\FCOCA~1.COR\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\config\FMWCON~1\carml -Digf.arisidstack.home=C:\Users\FCOCA~1.COR\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\config\FMWCON~1\arisidprovider -Doracle.security.jps.config=C:\Users\FCOCA~1.COR\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\config\fmwconfig\jps-config.xml -Doracle.deployed.app.dir=C:\Users\FCOCA~1.COR\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\servers\DefaultServer\tmp\_WL_user -Doracle.deployed.app.ext=\- -Dweblogic.alternateTypesDirectory=C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.ossoiap_11.1.1,C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.oamprovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.jdbc.remoteEnabled=false -Dwsm.repository.path=C:\Users\FCOCA~1.COR\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\oracle\store\gmds -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1211\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_oepe101\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_ocp371\profiles\default\sysext_manifest_classpath weblogic.Server
    <19-Dec-2012 2:37:23 o'clock PM EST> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
    <19-Dec-2012 2:37:23 o'clock PM EST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
    <19-Dec-2012 2:37:24 o'clock PM EST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 20.4-b02 from Sun Microsystems Inc..>
    <19-Dec-2012 2:37:24 o'clock PM EST> <Info> <Management> <BEA-141107> <Version: WebLogic Server Temporary Patch for 13340309 Thu Feb 16 18:30:21 IST 2012
    WebLogic Server Temporary Patch for 13019800 Mon Jan 16 16:53:54 IST 2012
    WebLogic Server Temporary Patch for BUG13391585 Thu Feb 02 10:18:36 IST 2012
    WebLogic Server Temporary Patch for 13516712 Mon Jan 30 15:09:33 IST 2012
    WebLogic Server Temporary Patch for BUG13641115 Tue Jan 31 11:19:13 IST 2012
    WebLogic Server Temporary Patch for BUG13603813 Wed Feb 15 19:34:13 IST 2012
    WebLogic Server Temporary Patch for 13424251 Mon Jan 30 14:32:34 IST 2012
    WebLogic Server Temporary Patch for 13361720 Mon Jan 30 15:24:05 IST 2012
    WebLogic Server Temporary Patch for BUG13421471 Wed Feb 01 11:24:18 IST 2012
    WebLogic Server Temporary Patch for BUG13657792 Thu Feb 23 12:57:33 IST 2012
    WebLogic Server 12.1.1.0 Wed Dec 7 08:40:57 PST 2011 1445491
    WebLogic Server 10.3.2.0 Tue Oct 20 12:16:15 PDT 2009 1267925
    WebLogic Server 10.3 Tue Nov 15 08:52:36 PST 2011 1441050
    WebLogic Server 10.3 Tue Nov 15 08:52:36 PST 2011 1441050 >
    <19-Dec-2012 2:37:25 o'clock PM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
    <19-Dec-2012 2:37:25 o'clock PM EST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.>
    <19-Dec-2012 2:37:25 o'clock PM EST> <Notice> <LoggingService> <BEA-320400> <The log file C:\Users\userP\AppData\Roaming\JDeveloper\system11.1.2.3.39.62.76.1\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms, such as Windows.>
    <19-Dec-2012 2:37:25 o'clock PM EST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Users\userP\AppData\Roaming\JDeveloper\system11.1.2.3.39.62.76.1\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log00003. Log messages will continue to be logged in C:\Users\userP\AppData\Roaming\JDeveloper\system11.1.2.3.39.62.76.1\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log.>
    <19-Dec-2012 2:37:25 o'clock PM EST> <Notice> <Log Management> <BEA-170019> <The server log file C:\Users\userP\AppData\Roaming\JDeveloper\system11.1.2.3.39.62.76.1\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log is opened. All server side log events will be written to this file.>
    19-Dec-2012 2:37:26 PM oracle.security.jps.internal.keystore.file.FileKeyStoreManager openKeyStore
    WARNING: Opening of file based keystore failed.
    <19-Dec-2012 2:37:26 o'clock PM EST> <Error> <Security> <BEA-090892> <The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: JPS-06514: Opening of file based keystore failed.>
    <19-Dec-2012 2:37:26 o'clock PM EST> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: JPS-06514: Opening of file based keystore failed.
    weblogic.security.SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: JPS-06514: Opening of file based keystore failed.
         at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadOPSSPolicy(CommonSecurityServiceManagerDelegateImpl.java:1402)
         at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1022)
         at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:873)
         at weblogic.security.SecurityService.start(SecurityService.java:148)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         Truncated. see log file for complete stacktrace
    Caused By: oracle.security.jps.JpsRuntimeException: JPS-06514: Opening of file based keystore failed.
         at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:167)
         at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:369)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         Truncated. see log file for complete stacktrace
    Caused By: oracle.security.jps.JpsException: JPS-06514: Opening of file based keystore failed.
         at oracle.security.jps.internal.policystore.PolicyUtil.getDefaultPDPService(PolicyUtil.java:2855)
         at oracle.security.jps.internal.policystore.PolicyUtil.getPDPService(PolicyUtil.java:3097)
         at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:164)
         at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:369)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         Truncated. see log file for complete stacktrace
    Caused By: oracle.security.jps.service.keystore.KeyStoreServiceException: JPS-06514: Opening of file based keystore failed.
         at oracle.security.jps.internal.keystore.file.FileKeyStoreManager.openKeyStore(FileKeyStoreManager.java:374)
         at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.doInit(FileKeyStoreServiceImpl.java:104)
         at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.<init>(FileKeyStoreServiceImpl.java:76)
         at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.<init>(FileKeyStoreServiceImpl.java:66)
         at oracle.security.jps.internal.keystore.KeyStoreProvider.getInstance(KeyStoreProvider.java:157)
         Truncated. see log file for complete stacktrace
    >
    <19-Dec-2012 2:37:26 o'clock PM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED.>
    <19-Dec-2012 2:37:26 o'clock PM EST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down.>
    <19-Dec-2012 2:37:26 o'clock PM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN.>
    <19-Dec-2012 2:37:26 o'clock PM EST> <Warning> <Security> <BEA-090922> <Certicom SSL is available, however JSSE is being used for SSL, since JSSE has been selected by attribute SSLMBean.JSSEEnabled, either explicitly or by default.>
    Process exited.

    I believe you can chmod back to your app user and correct the issue.
    -ryan

  • Get renamed file new name

    Hello all. What I'm wanting to do is rename a file and then do some things with the new file name.
    1. I want to view the new file name with the full path
    2. I want to output the new file name with the full path to a text file or csv file
    Here is what I have for outputting the renamed file into a text file, but it isn't working:
    cls
    $resultsfile = "C:\results3.txt"
    clear-content $resultsfile
    foreach($item in gc C:\RENAME.txt){
    Rename-Item $item "1.txt" | out-file $resultsfile -append
    notepad $resultsfile
    Any thoughts on how to work with the newly renamed file name?

    Yes, sorry I forgot to mention that I'm trying to delete a bunch of files whose names are too long. So what I 'm trying to do is to rename the files first with "1.txt" and then I'm going to delete them. I just had a "forehead-slap" moment where I realized
    I could just pipe the "rename-item" into "remove-item" and that should accomplish my goals.
    But, as for my original question, if I rename a file, how can i view/use the renamed file name? Like if I renamed a file, how could I output the newly renamed file name to a text file? I tried this in my original code above, but it didn't work. Let's just
    assume that I have a single file that I want to rename to "1.txt"

Maybe you are looking for

  • My 4th generation ipod wont update without deleting all of my Media. I dont want to do that. What do I do?

    I have a 4th generation 64 gb iPod Touch. I had a laptop that it was synced with but it crashed. Everytime I try to update it pops up a messege saying "Erase all media and update". I do not want to do that. It wont even let me put more music on it. I

  • Populate drop down in a selection screen

    Hi All, I have created a selection screen where i have a drop down field .How do i populate the drop down? In the backend i have a table type in the export param. which contains all the drop downs values. Please help. Thanks tubai.

  • Does aperture support Olympus ep-5

    I am going to buy a Olympus ep-5. Can i use aperture of Apple with raw files, or have i to buy Adobe lightroom? Can anyone help me out whit this? Thanks for doing so.

  • Changing Primary Monitor

    Hi All, I have a G5 Dual 2.5ghz running OSX10.5.2 that came with an ATI Radeon 9800XT video card. I am using 2 monitors, a 17" Apple studio display (DVI connector) and a Dell 24" LCD (DVI-I? connector - it plugs into the ADC port). The Apple display

  • Accounts not assigned in report

    Hi, Can anyone help me out? What´s the reason because the ammount shown in Financial Statement area equal in Accounts not assigned? This shouldn´t be happening? In advance thanks for your comments JoseR