@FINDSTR - How to find an element containing . (dot) when . (dot) is wildcharacter
I'm checking a LogFile containing FileName(s) and want to Include/Exclude files according to FileType.
How to use @FINDSTR to find an element containing . (dot) when . (dot) is wildcharacter...???
PowerShell ${"%MainDir%\%FullPath%\%FullFileName%"} = Get-Content ${"%MainDir%\%FullPath%\%ListFileName%"}
|Select-String '\.mp3|\.mp4|\.m4a|\.flac|\.cue|\.ogg|\.ape|\.wav|\.wv'
That wont work. Two things wrong
First thing
Get-Content expects a filename like Get-Content c:\music.txt
or Get-Content
"%MainDir%\%FullPath%\%ListFileName%"
Get-Content ${c:\music.txt} will try to get the filename in the file c:\music.txt and not use c:\music.txt
itself.
Second Thing
${"%MainDir%\%FullPath%\%FullFileName%"} = is wrong, don't use the " inside the { }, the { } act as a
quotes
for example ${C:\My Documents\Music.txt} = is ok, that will work, this is a variable
PowerShell ${"%MainDir%\%FullPath%\%FullFileName%"} = Get-Content ${"%MainDir%\%FullPath%\%ListFileName%"}
|Select-String '\.mp3|\.mp4|\.m4a|\.flac|\.cue|\.ogg|\.ape|\.wav|\.wv'
Should be
PowerShell ${%MainDir%\%FullPath%\%FullFileName%} = Get-Content "%MainDir%\%FullPath%\%ListFileName%"
|Select-String '\.mp3|\.mp4|\.m4a|\.flac|\.cue|\.ogg|\.ape|\.wav|\.wv'
Similar Messages
-
How to find the ME29N 'USER EXIT' when our save the release PO after.
How to find the ME29N 'USER EXIT' when our save the release PO after.
which user exit will be used?
thanks.
alex.Hi,
process :
go to tranx code : ME29N ,
System---->Status , here copy the program name (SAPLMEGUI),
go to abap editor and specify the program name SAPLMEGUI and find the package "ME".
tranx code : CMOD , Utilites--->Sap Enanchement,
specify the package name : ME
and execute, displays a list of exits ,
and find out our suitable exit based on requirement.
check these : EXIT_SAPMM06E_021
reg
Siva -
How to find the elements of an array
I want to find the number of elements in an array, and I can't find the tutorial that shows how to find it. If anyone could point me in the right direction, it would be greatly appreciated.
warnerja wrote:
flounder wrote:
DrLaszloJamf wrote:
You mean x.length?<pbs>
Depends upon your interpretation of "number of elements in the array"
int[] numbers = new int[10];
numbers[0] = 42;
numbers[1] = 666;Number of elements in the array is 2 not 10.
</pbs>If you used something other than a primitive type for the array element type you could have a case. A value of integer zero for the other elements is still a value, so there are indeed 10 elements there.Even if it were not primitive, every element would have a value. That value would either be null or a reference. -
How to find out the containing jinternalframe?
anyone know the solution to this problem?:
1. i have a jinternalframe
2. in the jinternalframe i have a jlist
3. each list cell is rendered with a jlabel
4. i have an action emanating from one of the list cells
5. in the action handler, i need to get a reference to the containing internalframe
of the component that is the source of the event (the jlabel rendered inside
the jlist).
in java 5, oddly, SwingUtilities.getAncestorOfClass() (that is, walking up the
component hierarchy) works.
in java 6, it doesn't.
the problem is that jlists and other such model components are leaf components.
they represent a discontinuity in the component containment hierarchy. the poor
list cell renderers are and must remain dumb.
anyhow, back to my question: is there any way to find out the containing
jinternal frame?
thanks, eitanis there any way to find out the containing jinternal frame?Not sure about the Renderer part, but here's a simple demo that puts a JList in a JScrollPane, which is then put on a JPanel, which is then put on the contentPane of a JFrame. Once the frame has been realized (this is key), there's a recursive method that will find whatever you're looking for.import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class MyFrame extends JFrame
Component mysteryParent;
public MyFrame()
super("Find Parent");
setName("The Amazing Frame");
setDefaultCloseOperation(EXIT_ON_CLOSE);
JList list = new JList();
JScrollPane scroll = new JScrollPane(list);
scroll.setName("The Silly Scroll");
JPanel panel = new JPanel(new BorderLayout());
panel.setName("The Plain Panel");
panel.add(scroll, BorderLayout.CENTER);
Container c = getContentPane();
c.setLayout(new BorderLayout());
c.add(panel, BorderLayout.CENTER);
pack();
// first, let's try to find the containing frame
mysteryParent = getParentOf(list, JFrame.class);
if (mysteryParent != null)
System.out.println("The frame that contains the list is: " + mysteryParent.getName());
// then, let's try to find the containing panel
mysteryParent = getParentOf(list, JPanel.class);
if (mysteryParent != null)
System.out.println("The panel that contains the list is: " + mysteryParent.getName());
// finally, let's try to find the containing scroll pane
mysteryParent = getParentOf(list, JScrollPane.class);
if (mysteryParent != null)
System.out.println("The scrollPane that contains the list is: " + mysteryParent.getName());
// recursive method:
public Component getParentOf(Component child, Class parentClass)
Component parent = null;
if (child != null)
parent = child.getParent();
if (parent == null)
return null;
else if (parentClass.isInstance(parent))
return parent;
return getParentOf(parent, parentClass);
public static void main( String[] args )
MyFrame frame = new MyFrame();
frame.setVisible(true);
}I just swagged this just now, so maybe it could be improved.
I'm guessing that SwingUtilities.getAncestorOfClass() already does this, but I've never used it so I'm not sure. -
How to choose some elements containing some Specific alphabets from an array?
for example, an array contains the following elements: AA1 AA2 AAB CAA ABC BBE BAA . I want to choose out the elements containing AA,that is
AA1 AA2 AAB CAA BAA. Can you give me the relevant procedures? thank you!as the picture
Attachments:
11.jpg 15 KB -
How to find function module exit name when i know the Include
As per my requirement i should change the existing exit. I know the include name but i want to
know exit name. How to find out exit name based on include name. I tried Where-used list but it
is not giving the exit and function module name.Please let me know.
Regards
RajithaHello Rajitha,
1. You can do a "where-used" for the include & get the corresponding name of the exit function module.
2. Goto table MODSAP & in the field MEMBER pass the name of the function module & you will get the Exit Name in the NAME.
Hope this helps.
BR,
Suhas
Edited by: Suhas Saha on Mar 16, 2009 3:08 PM -
How to find the Role contains any Tcode
Dear Sir/Madam,
With SUIM I found users list having a tcode sm30. But when I tried to find out the exact Role containing that Tcode with SUIM , it is not showing any role. I have to remove this Tcode from these Users. How it can be done?
Please advice.
Thanks and Regards,
Pranab> But when I tried to find out the exact Role containing that Tcode with SUIM , it is not showing any role.
The suim report roles "by transaction assignment" is notoriously unreliable because it only looks in the role menus. Better use the report for roles "by authorization values", fill in "S_TCODE" as object 1, hit the enter key and give SM30 as value. Now you should get a list of roles containing SM30, even if it isn't in the role menu.
I think that's less tedious than Bala's suggestion and just as accurate.
For more detailed explanations browse or search the SDN forum.
Jurjen
One other thought: Are there any profiles assigned directly to the users? That would also explain the behaviour you described.
Edited by: Jurjen Heeck on Dec 30, 2009 4:30 PM -
How to find cost element group linked to account number
Hi all,
I have following scenario.
I have account number and i want to find out it's cost element group.
In t-code KAH3 when i enter cost element group i get all the account number in that group.
But the problem is that i have account number and i want to find out in which cost element group this
account number belongs.
Is there is any fuction module from which i can get cost element group from account number or from which table i can fetch cost element group depending upon the account number.
Thanks in advance.
sachinhi,
check this function module.
BAPI_COSTCENTERGROUP_GETDETAIL
table - SETLEAF. -
How to find the elements in the UI panel.
Hello,
I have a UI panel from a plugin. I just need to automate it, like setting the text in the text box and clicking a button in the panel. For eg application.activeDcoument.swatches will bring in the swatches panel. Similarly i can able to call my panel using the adobe ID. But i cant able to set the elements inside the panel. Plz help. Thanks in advance.
Regards
jpkbedduFor eg application.activeDcoument.swatches will bring in the swatches panel.
No it does not.
Ask the plugin supplier how to access its function through a script. And don't be too surprised when you are told it doesn't support scripting. -
How to find PIP element of a Proyect or PEP element ?
Hi, I need to know how can I get the PIP elements information of a specific Proyect, knowing the Project or the PEP Element.
There is any FM, Bapi or any1 the Table relation to get this data ?
ThxHi Abhijit,
try EKKN (Account Assignment in Purchasing Document).
Pass WBS to EKKN-PS_PSP_PNR to get PO Number (EKKN-EBELN)
or Pass PO Number and get WBS (EKKN-PS_PSP_PNR).
thank
Sunil -
How to find Screen element names in a program programatically
Hi Experts,
I have to find out all the table control names in a program. I am able to find all the screen numbers for a program from the table D020S. Is there any functionality to find out the table controls in a program or atleast screen elements in a program?
Thanks and regards,
venkat.Hello
You can get the information by calling the below two FM's. First call the FM IAC_GET_DYNPRO_INFO by passing the program name and screen number. This will return an internal table with all the screen elements of structure D021S.
Next loop through this internal table and pass the structure to FM RS_SCRP_GET_FIELD_TYPE_TEXT to know what kind of screen element it is.
Also, if the FILL parameter of the first FM is 'T', then it is a table control.
Regards
Ranganath -
How to find the servlet container used via servlet
I need to write code for different servlet container in a servlet. so I need to find in runtime what servlet container is used.
Please let me know is there any possibility to get the servlet container name in servlet.
Thanks & Regards,
Nasrin.Nimport javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class Context extends HttpServlet {
public void service(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException {
PrintWriter out=res.getWriter();
res.setContentType("text/html");
ServletContext stx=getServletContext();
out.println("ServletContext " + stx.getServerInfo());
} -
How to find WBS element total asset value
hello all,
i have a requirement like this..
i have displayed profit center wise PM orders with total actual cost.....
similarly i have another report where i need to display profit center wise WBS elements with total asset value....
from which table do i need to take this total asset value ,how do i link this table with PRPS table...
thanks in advance....hello all,
i have a requirement like this..
i have displayed profit center wise PM orders with total actual cost.....
similarly i have another report where i need to display profit center wise WBS elements with total asset value....
from which table do i need to take this total asset value ,how do i link this table with PRPS table...
thanks in advance.... -
How to find WBS-Elements of CO-DOC-Numbers
Hi,
I need to know, whether a wbs element exists for a CO doc number / CO item number, or not.
I have to create an extractor to load the doc number - wbs element mapping into BI.
Do someone have some R/3 table proposals?
Exists a meta data repository like in BI or a used-in function for R/3?
DataSource 0WBS_ELEMNT_ATTR extracts wbs elements as field POSID.
DataSource 0CO_OM_CCA_9 extracts CO doc number as field BELNR.
DataSource 0CO_OM_CCA_9 extracts CO item number as field BUZEI.
Field 0AUXACCVAL is not useable in case of error in R/3: PM orders with wbs elements will not get an valid 0AUXACCVAL value.
Thanks and regards,
Wolfgangwarnerja wrote:
flounder wrote:
DrLaszloJamf wrote:
You mean x.length?<pbs>
Depends upon your interpretation of "number of elements in the array"
int[] numbers = new int[10];
numbers[0] = 42;
numbers[1] = 666;Number of elements in the array is 2 not 10.
</pbs>If you used something other than a primitive type for the array element type you could have a case. A value of integer zero for the other elements is still a value, so there are indeed 10 elements there.Even if it were not primitive, every element would have a value. That value would either be null or a reference. -
How to find a view containing specified fields
Hello Guys,
I have got some fields of R/3 table based upon which i have to find View which has all the fields.
I know that we have to go to help.sap.com and search there, but where to go after that i am not sure.
Since i am new to BW , please guide me.
Regards,
Dolly>
adlins wrote:
> Hi Dolly,
>
> Go to R3 system, and click on 'where-used' list for those particular fields,
> in that you will get list of objects which are using this field,
>
> please ask if u need more help.
>
> --adlin
I am sorry my question is i know field names from R3 for example bukrs etc. which i want to have in my report.
But i do not know in which view they all are present. I want the to know the perticular view'name to create my report.
from help.sap.com where to search for same?
Maybe you are looking for
-
I am losing my carriage returns when sending emails using the Internet email vi's. All carriage returns are stripped out and I get one long word wrapped paragraph. I want to avoid html. Ideally, using the vi's for rich text would be perfect, but a si
-
To CHARGE or NOT to CHARGE, that is the 3G question!
Man I am so confused. I read CHARGE it like a laptop thus if near a plug, plug it in as its like a laptop and goes on cycles not turning 20% and then charge into your 20% becoming the 100% then having 1 hour on your battery. So, which is it? I have r
-
Im too worried about the battery percentage while playing a game on my iphone 4s.so that,i decided to play a games and charging at the same time.im too worried for my battery problem on the future.please give a conclusion.
-
I have purchased the HP dv6 6024tx howver it only comes with 4gb of RAM, 1.5 of it is constantly in use and it often peaks when playing games or importing items into programs, does anyone know where I can purchase an additional 4gb of ram (if I can,
-
Can You Set Snooze Off (by Default) for New Alarms?
I'd like to be able to have the snooze function off by default when creating alarms using the Clock app (particularly for alarms created via Siri, but also for manually set alarms), but there seems to be no way to do this. Do you have to create the a