Announcement

Collapse
No announcement yet.

Need Help on how to gather part of a filename

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Corey
    replied
    Re: Need Help on how to gather part of a filename

    No probs, glad it works... [img]/ubbthreads/images/icons/smile.gif[/img]

    Corey Milner
    Creative Director, Indigo Rose Software

    Leave a comment:


  • Martin_SBT
    replied
    Re: Need Help on how to gather part of a filename

    Yeah, that made it! Thanks gents.


    AMS ROCKS!!

    Leave a comment:


  • Corey
    replied
    Re: Need Help on how to gather part of a filename

    Simply add a small application sleep action, i.e. .5 seconds before your listbox action and every thing will be fine. The problem in this case is that AMS is getting a bit ahead of your computer...

    Corey Milner
    Creative Director, Indigo Rose Software

    Leave a comment:


  • Martin_SBT
    replied
    Re: Need Help on how to gather part of a filename

    ummmm...It doesnt here! I even tried to move to actions on "Page show" instead of "On Initialize" but still the same error!! I am running WinXP! Should i contact Technical Support?

    Leave a comment:


  • TJ_Tigger
    replied
    Re: Need Help on how to gather part of a filename

    Works fine here.

    Leave a comment:


  • Martin_SBT
    replied
    Re: Need Help on how to gather part of a filename

    You are the man! :0) Thanks!

    now here another one for you. Now that i have my global list populated, i am trying to add the its content to an object list box but at run time it give me an error: "Could not add item to the listbox object. The object was not found on this page 'listbox2'." But the listbox object really exist!! Any idea on what is wrong? here the action from my project:

    IR_ACTIONS_LIST>
    <Action name="Get Item">
    <Type>112</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <TargetList>Computers</TargetList>
    <GetType>1</GetType>
    <Index/>
    <IndexDelimiter>;;</IndexDelimiter>
    <Variable>%ListItem%</Variable>
    <VarDelimiter>;;</VarDelimiter>
    </Action>
    <Action name="Add">
    <Type>118</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <TargetListBox>ListBox2</TargetListBox>
    <AddType>1</AddType>
    <Index/>
    <ItemToAdd>%ListItem%</ItemToAdd>
    <ItemDelimiter>;;</ItemDelimiter>
    </Action>
    </IR_ACTIONS_LIST>

    Leave a comment:


  • Corey
    replied
    Re: Need Help on how to gather part of a filename

    Hi. Just use a STRING > GET DELIMITED STRING action setting the delimiter to _ and your item at index 0 will be the computer name then just use a GLOBAL LIST > ADD action to add it to your global list...

    Corey Milner
    Creative Director, Indigo Rose Software

    Leave a comment:


  • Martin_SBT
    started a topic Need Help on how to gather part of a filename

    Need Help on how to gather part of a filename

    Hello Boys and Girl

    I have a file called "CAMONW0078_Ins_DB.atom.fdb.DB". In my AMS4 project i searched for the file and stored the filename and ext into a variable called "%FileName%. The first part of the filename (everything that is before "_Ins_") represent a computer name. I would like to have an easy way to keep ONLY what appears before "_Ins_" and store it into a global list. Since the numbers of caracters in the computer name will differ from computer to computer, i cant see how to accomplish that. If anyone can help me out, i will be the happiest man in the world!

    thanks in advance

    Martin
Working...
X