Help with for loop and remove-item command

Hi all here is the code so far
$a = Get-Content C:\Users\cody-horton\Desktop\test.txt
for($i=0;$i -lt $a.Length;$i++){
#$temp = [int32]::Parse($a[$i])
Remove-Item '\\ceit2551202x0'$a[$i]'\C$\Program Files\MATLAB\R2013a\*' -Force
I have a text file with a few number in it that i want to get. They are in the array $a but I'm getting an error that says a positional parameter cannot be found that accepts argument '53' (it does this for all the numbers in the array.) I know in java you
could have something like this   string + int + string. 
I'm not sure what to do I also tried to parse it with no luck. Thanks any help is appreciated.

Your issue is with the path for Remove-Item, it is not complete so try this
Remove-Item "\\ceit2551202x0$($a[$i])\C$\Program Files\MATLAB\R2013a\*" -Force
I am unable to test, so I would add the -WhatIf switch to make sure it outputs what you expect
If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.
Don't Retire Technet

Similar Messages

  • Need help with arranging Parent and Child item accordingly

    Hi Experts,
    I have a sales BOM in SBO, here we need to show both the Parent and child items. but we do not have to show the Sr.no and Qty for the child items.
    Kindly help me out how I can do it.
    Below pasted is the image of my sales order,
    Also i have attached the report with it.
    Requesting you to kindly help..
    thanks and regards,
    Nandish.

    The Sales BOM helps in identifying that. The product in Red is the Parent Item and the product in Grey are Child items.  The paretn item is the table OITT.Code and child items are in ITT1.code.
    Let me now if you require more information.
    Also how can I send you the layout here for your reference?
    thanks in advance,
    Nandish.

  • Function with for loop and parameter table/column names ... syntax help

    I'm trying to create a function that returns the distinct values and counts from a user defined schema/table/column.
    The code below defines an object type [stats_on_column_obj] and creates a single table of this type [stats_on_column_tab].
    The function is supposed to take three input variables: p_schema_name, p_table_name, p_column_name and return a table (above).
    I can hard code a SELECT statement into the () ... but once I try to convert it to parameters & exec immediate I am stuck. The red section is where the issue is (i think).
    Oracle 10g.
    CREATE TYPE stats_on_column_obj IS OBJECT(
      COL_VAL      VARCHAR2(500),
      COL_VAL_CNT  NUMBER    (7)
    CREATE TYPE stats_on_column_tab IS TABLE OF stats_on_column_obj;
    CREATE OR REPLACE FUNCTION get_STATS_ON_COLUMN
       p_schema_name IN varchar2,
       p_table_name IN varchar2,
       p_column_name IN  varchar2
       RETURN STATS_ON_COLUMN_tab
    IS
       l_STATS_ON_COLUMN_tab   STATS_ON_COLUMN_tab := STATS_ON_COLUMN_tab ();
       n                       INTEGER := 0;
       str_select_tbl          varchar2(5000);
    BEGIN
       str_select_tbl := 'SELECT '||p_column_name||' as col_val, count(*) as col_val_cnt FROM '||p_schema_name||'.'||p_table_name||' group by '||p_column_name;
       FOR r IN (str_select_tbl)
       LOOP
          l_STATS_ON_COLUMN_tab.EXTEND;
          n := n + 1;
          l_STATS_ON_COLUMN_tab (n) := STATS_ON_COLUMN_obj (r.col_val, r.col_val_cnt);
       END LOOP ;
       RETURN l_STATS_ON_COLUMN_tab;
    END;
    [Error] PLS-00103 (124: 4): PLS-00103: Encountered the symbol "LOOP" when expecting one of the following:   * & - + / at mod remainder rem .. <an exponent (**)> ||   multiset year DAY_
    [Error] PLS-00103 (126: 9): PLS-00103: Encountered the symbol "=" when expecting one of the following:   constant exception <an identifier>   <a double-quoted delimited-identifier> table LONG_ double ref   char time timestam
    [Error] PLS-00103 (127: 29): PLS-00103: Encountered the symbol "(" when expecting one of the following:   constant exception <an identifier>   <a double-quoted delimited-identifier> table LONG_ double ref   char time timestam
    [Error] PLS-00103 (128: 4): PLS-00103: Encountered the symbol "END" when expecting one of the following:   begin function package pragma procedure subtype type use   <an identifier> <a double-quoted delimited-identifier> form
    SELECT * FROM TABLE (get_STATS_ON_COLUMN('SCHEMAS_X','TABLE_X','COLUMN_X'));

    SCOTT@orcl > CREATE OR REPLACE
      2    FUNCTION get_STATS_ON_COLUMN(
      3                                 p_schema_name IN varchar2,
      4                                 p_table_name IN varchar2,
      5                                 p_column_name IN  varchar2
      6                                )
      7      RETURN STATS_ON_COLUMN_tab
      8      IS
      9          v_STATS_ON_COLUMN_tab STATS_ON_COLUMN_tab := STATS_ON_COLUMN_tab ();
    10          v_n                   INTEGER := 0;
    11          v_str_select_tbl      VARCHAR2(5000);
    12      BEGIN
    13          v_str_select_tbl := 'SELECT stats_on_column_obj(' || p_column_name || ',count(*)) FROM ' ||
    14                              p_schema_name || '.' || p_table_name || ' group by ' || p_column_name;
    15      EXECUTE IMMEDIATE v_str_select_tbl
    16        BULK COLLECT
    17        INTO v_STATS_ON_COLUMN_tab;
    18       RETURN v_STATS_ON_COLUMN_tab;
    19  END;
    20  /
    Function created.
    SCOTT@orcl > select  *
      2            from  table(
      3                        get_STATS_ON_COLUMN(
      4                                            'SCOTT',
      5                                            'EMP',
      6                                            'JOB'
      7                                           )
      8                       )
      9  /
    COL_VAL              COL_VAL_CNT
    CLERK                          4
    SALESMAN                       4
    PRESIDENT                      1
    MANAGER                        3
    ANALYST                        2
    SCOTT@orcl >
    Or better change it to pipelined function.
    SY.

  • Need help with while loop and shift registers

    I have a large data set and need to read in the data at maybe 200 samples at a time, process these samples through my VI, and have it append and concatenate a separate lvm file.  The part where I am confused is the shift registers. How do I limit the number of samples read in an iteration? How do I get the while loop to stop when all the data are read in?
    I've attached my diagram, maybe there is something wrong with my technique?
    Solved!
    Go to Solution.
    Attachments:
    shiftreg.JPG ‏56 KB

    This will give you an idea.  There are plenty of other (probably more efficient) methods.  This is a basic, quick and dirty solution to help you grasp the overall concept.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013
    Attachments:
    ShiftRegLoop.JPG ‏54 KB

  • [svn:bz-trunk] 21277: Added ds-console source to package-oem and removed copy command for datavisualization .swc which doesn't exist in the specified location.

    Revision: 21277
    Revision: 21277
    Author:   [email protected]
    Date:     2011-05-18 11:35:28 -0700 (Wed, 18 May 2011)
    Log Message:
    Added ds-console source to package-oem and removed copy command for datavisualization.swc which doesn't exist in the specified location. I do not find it in the most recent package-oem.zip neither
    Modified Paths:
        blazeds/trunk/build.xml

    Gusar wrote:No, it's not. I have actually seen cases where software rendering gave a higher glxgears score than hardware rendering (and no, it wasn't about vsync). Of course, with *actual* apps on the same machine, software rendering sucked compared to hardware rendering.
    Please do not jump to conclusions and make assumptions here like 'when will people finally get it??'.  I never said it was a benchmark.  I have also seen many examples of where it's results do not go with conventional performance.  I have a Radeon 9000 that goes faster on glxgears than a Geforce FX 5600 running Nouveau.  Which is the faster card?  The FX by miles.  It is not a benchmark as it can not be compared between configurations.  What I know is that on this individual system, from prior experience over many years when 3D acceleration is working glxgears gets between 300 and 400 fps.  When it is not working it gets less than 10.  That is a fact but does not mean it is benchmarkable.  Yes, a Quake 3 timedemo (I have these numbers too and they very much correlate to glxgears performance for this system given just how slow it is) would be a benchmark but when it runs less than 0.1fps and even the 2D rendering means that navigating the menu is impossible, there just isn't the time to find out.  Hence if playing around with drivers on this system I would use glxgears to check that 3D acceleration is working but not to benchmark.  Glxinfo does not give you all this evidence.
    But to clarify, I wouldn't use glxgears as a benchmark, benchmarking is different and I do a lot of that too.

  • What's the phone number I should call for help with my iPhone and ihome dock?

    What's the phone number I should call for help with my iPhone and ihome dock?

    http://www.ihomeaudio.com/support/

  • Help on changing array elements with For loop

    Hi,
    I'm wondering if anyone can help me with this problem.  I'd like to be able to modify elements of an array with For loop.  In the attached VI, my goal is to have an array of [0 1 2 3 4 5], but instead what I've got is [2 2 2 2 4 5].  I initialized the array with a value of 2 to help me identify which elements are changing.  Can anyone help me pointing where my mistake is?  Thanks.
    Peter
    Attachments:
    Array test.vi ‏19 KB

    It's a classic issue for LV newbies. In this case you HAVE to use a
    shift register otherwise the modifications of previous cicles are lost.
    It's all easier than it's seems, see attached vi.
    bye,
    manga
    Attachments:
    Array test 2.vi ‏19 KB

  • Tables related to PM order for actual and commitment items

    Hello Experts,
    I need help in finding the tables related to PM order for actual and commitment items.
    I need develop a report which can show the actual and commitment items for each order and Operation/component under that each ITEM wise and its related documents.
    For the component we can find the table RESB.
    But i am getting the difficult to find the data related to Operation (services)
    In my client we can able to see PM orders with activity types and SKF
    How can build the logic to find the values for each operation item and its commitments (PO, PR) and actual that is FI documents
    Please guide me the   TABLES and fields or else give me the hints, how can find the tables
    Thanks and Regards,
    Narendra

    Hi,
    The tables are COEP (actuals) and COOI (commitments); that is if you mean the financial figures.
    Regards,
    Eli

  • Create withholding tax data subsequently for reconciled and open items in c

    Hi All,
    Mine is a US co code and I have a  vendor for which invoice and payment documents are posted. After posting the invoice i found that the vendor is subjected to classic withholding tax which i did not calculate when posting invoice, making payments.
    Now i have changed the vendor master data with relevant withholding tax details.
    I know the program RFWT0020 allows us to create withholding tax data subsequently for reconciled and open items in cases where vendors or customers become liable for withholding tax with a tax rate of 0 %.
    It is not working out for me.
    Can any body help me on this.
    Thanks in advance.

    Dear all,
    by se38 --> report documentation, You can read carefully the following:
    The auxiliary program makes it possible to convert both classic and extended withholding tax data. However, with classic withholding tax, ONLY VENDOR data can be converted.
    In addition, the program enables the withholding tax code to be changed for reconciled and open items with existing withholding tax data. For this, the tax rate of the existing withholding tax data as well as the tax rate of the new withholding tax code must be 0%. The new withholding tax codes are taken from the customer or vendor master data. In the case of extended withholding tax, the withholding tax code is only changed if the related withholding tax categories are the same.  The withholding tax base amount is not changed by this procedure.
    Recreating or changing the withholding tax data requires that the program first be executed for INVOICES and then executed for PAYMENTS in a subsequent step.
    I hope this helps You.
    Mauri

  • Need help with the session state value items.

    I need help with the session state value items.
    Trigger is created (on After delete, insert action) on table A.
    When insert in table B at least one row, then trigger update value to 'Y'
    in table A.
    When delete all rows from a table B,, then trigger update value to 'N'
    in table A.
    In detail report changes are visible, but the trigger replacement value is not set in session value.
    How can I implement this?

    You'll have to create a process which runs after your database update process that does a query and loads the result into your page item.
    For example
    SELECT YN_COLUMN
    FROM My_TABLE
    INTO My_Page_Item
    WHERE Key_value = My_Page_Item_Holding_Key_ValueThe DML process will only return key values after updating, such as an ID primary key updated by a sequence in a trigger.
    If the value is showing in a report, make sure the report refreshes on reload of the page.
    Edited by: Bob37 on Dec 6, 2011 10:36 AM

  • ERROR -- Checksum error for Hidden and Protected item ID

    Hello all,
    I usually get the error:
    Checksum error for Hidden and Protected item ID (10785219011206310), value (on), posted checksum (C1DEF33B4C8D57845151B7D18363B3D7), expected checksum (********************************), index_i (3), index_j (2), index_m (1);
    I have already found one thread with this question - Checksum error for Hidden and Protected item ID
    but there are no answers to this problem.
    Any thoughts how to solve this and what is causing it??
    Regards Pedro.

    Pedro,
    Read under the improved security section in the below article.
    http://www.oracle.com/technology/products/database/application_express/html/3.1_new_features.html
    I used to receive the same error because I was trying to update the value of the hidden and protected item on the same page repeatedly.
    I changed the item type to hidden to avoid the error.
    Hope this helps,
    Dippy

  • Checksum error for Hidden and Protected item

    I have a region with 3 items - a Text field, a Text area and a Hidden and Protected item. When clicking on the save button the record should be written to the table. However I get the following error:
    ++Checksum error for Hidden and Protected item ID (7676217916943303), value (), posted checksum (1060941776BCEA7DDAE813A442DF01E3), expected checksum (********************************), index_i (8), index_j (1), index_m (3);++
    When I change the hidden and protected field to a regular text field I am able to successfully process the page.
    Do I have to do anything different when I have a hidden and protected field? Would appreciate any suggestions/comments to help resolve this issue.
    Regards,
    Ghazi

    If you have client-side code that changes the value of a "Hidden and Protected" item after the item/value has been emitted to the page by Application Express, you need to change the item type to Hidden, instead.
    Scott

  • For-loop & iterator.remove()

    Is it possible to remove an item during iterating with for-loop?
    for (SelectionKey opKey : selector.selectedKeys())
         // I need to remove opKey from selectedKeys set.
    }Is it really necessary to remove handled key from selectedKeys set? What will happen if I run selector.select() while selectedKeys set contains some keys?

    Desiderata wrote:
    Is it possible to remove an item during iterating with enhanced-for-loop?No
    Is it really necessary to remove handled key from selectedKeys set? What will happen if I run selector.select() while selectedKeys set contains some keys?[Selector Selection|http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/Selector.html#selop]

  • Erro Checksum error for Hidden and Protected item ID (1118508917223363)

    i am generating one report with delete option.For delete Link i am using one HIdden item P1_SELECT
    when i select it with text field then no error.but when i select it hidden then it show me
    Checksum error for Hidden and Protected item ID (1118508917223363), value (2), posted checksum (C4733DF9C658202B914CF661E2349FFC), expected checksum (********************************), index_i (6), index_j (4), index_m (4);How can i remove this error.
    Thanks

    Hi,
    The problem is when you are creating an item "Hidden and protected" so apex will associate a checksum value for that item's value and as you are changing the value, the checksum will not changed.
    If there is no security issue use "Hidden" instead of "Hidden and protected" for that item.
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • How to link asset with purchase order and PO Item.

    Hello,
           I have to generate a report which contains columns
    Asset No , po no(ebeln) ,PO Item(ebelp),Material no etc
    My query is how to link asset with purchase order and      PO Item.
    I am selecting asset and po no. from anla  but how to get
    po item no(ebelp)?
    po line item is important in this report because every line item has differrent asset and material no.
    i tried to match asset no in mseg table but i am not getting asset no in mseg .
    how should i proceed ?

    Thanks Thomas & Srimanta for the quick response.
    When I checked EKKN table by entering PO there is no asset no. in anln1 field.
    Also I would like to add that, In me23n for a PO, account assignment category we are entering 'F' for internal order settlement.
    Where can i find the link between asset and po no(ebeln) and po item(ebelp)?
    Regards,
    Rachel
    Edited by: Rachel on Aug 11, 2008 7:23 AM

Maybe you are looking for

  • Is there a way to create a calendar for keynote that automatically updates to current month?

    I use keynote presentations for teaching foreign languages and wanted a calendar that updates automatically to current month everytime I present it rather than making it manually each month.  I'm wondering if it can be done using the keynote date/tim

  • Dark Knight Sync

    I bought the Dark Knight DVD that came with a digital copy and down loaded it into iTunes. But when I sync my 5th gen iPod the movie almost finishes transfering and errors out. Is it only compatable with the iPhone and touch? I found out the first ti

  • Region wise Repository for SRM MDM

    Hi, We are in Migration of CCM to MDM. In CCM we have so many catalogs. So we are creating 3 repostoteries in MDM based up on the region. Can any pls let me know the how the supplier data can be replicated to MDM ? we dont have XI. Please let me know

  • How to push tickets from one solution Manager to other Solution manager

    Hello,,,,alll i want to push tickets from one solution manager to other solution mamager. Also the status along with various partnet function to be updated as well. i have done lot of rnd over it..weent thru all the spro settings......even had my dev

  • Flash Player Update Service Problem

    Hallo, I use Firefox, Vers. 13.0.1. and  Adobe Flash Player Vers. 11.3.300.262 According to the new installation of Firefox 13.0.1. and the above version of AFP the problem of AFP crashing after closing Firefox was resolved. However, I now have the p