Select Page
Codoid Blog

More Methods For PathFinder

Being a leading QA Company, we write blogs on all prominent software testing topics and tools using our real-world experience. So stay sharp by subscribing to our Newsletter.

Most of us are aware of the Locate method available for PathFinder object, but there are more useful and unfamiliar methods associated with PathFinder Object. We have listed those methods below,

INSERT

Description:

This method is used to add a new folder path to the Folders list (Tools-> Options-> Folders).

Syntax:

PathFinder.Insert [Path],[Index] 
  

Example:

PathFinder.Insert "C:Test",0  
  

The above example will add new folder path to the Folders list.

FIND

Description:

This method returns the Index of the specified path.

Syntax:

Msgbox PathFinder.Find [Path]
  

Example:

Msgbox PathFinder.Find("C:Test") 
  

It returns the Index of the specified path. If the path is not found, it will return -1.

MOVEITEM

Description:

This method can be used to swap the Index of two folder paths.

Syntax:

Pathfinder.MoveItem [Source_Index],[Destination_Index]
  

Example:

Pathfinder.MoveItem 1,0
  

REMOVE

Description:

This method removes the specified folder path from the folders list.

Syntax:

Pathfinder.Remove [Path]
  

Example:

Pathfinder.Remove("C:Test")
  

REMOVEALL

Description:

This method removes all the items from the folders list.

Example:

Pathfinder.RemoveAll
  

Note: It removes default folder item as well.

REMOVEBYINDEX

Description:

It removes the folder path item using Index.

Syntax:

PathFinder.RemoveByIndex([Path_Index])
  

Example:

PathFinder.RemoveByIndex(0)
  

SAVE

Description:

Save method can be used to commit all the changes which are done using PathFinder object. If Save method is not used, your changes in Folder List will not be retained.

Example:

PathFinder.Save
  

Comments(0)

Submit a Comment

Your email address will not be published. Required fields are marked *

Talk to our Experts

Amazing clients who
trust us


poloatto
ABB
polaris
ooredo
stryker
mobility