WalkSiblingDirectories¶
-
MacroModule
¶ genre File
author Jonas Singe
package FMEstable/ReleaseMeVis
definition WalkSiblingDirectories.def keywords directory
,walk
,folder
,sibling
,compare
Purpose¶
Walks through two directories that contain files with the same names.
Usage¶
- Select two directories that you want to compare.
- Optionally, specify filename patterns to exclude some of the files.
- Press update to load the file comparison list.
- Use the navigation controls to walk through the file pair list.
Details¶
The files can also be located in subfolders of the directories. The paths of the currently selected file pair are outputted and the module user can decide on his own what do with them.
If a file is only contained in one of the folders, it shows up in the file pair list and the path for the opposite folder is an empty string.
Tips¶
The list of comparison entries can also be accessed on scripting level:
entries = ctx.module("WalkSiblingDirectories").object().getAllComparisonEntries()
for entry in entries:
print entry.relativePath # e.g. exampleSubfoldertest.txt
print entry.absolutePathReference # e.g. C:/reference/exampleSubfolderTest.txt
print entry.absolutePathResult # e.g. C:/result/exampleSubfolderTest.txt
Parameter Fields¶
Field Index¶
Current file pair: : Integer |
Jump to selected pair: : Integer |
Total number of file pairs: : Integer |
Exclude: : String |
Last : Trigger |
|
File in first folder: : String |
Next : Trigger |
|
File in second folder: : String |
Previous : Trigger |
|
First : Trigger |
Process Directories : Trigger |
|
First folder: : String |
Regular expression (inCanIncludePatternContainRegExp) : Bool |
|
Include: : String |
Regular expression (inCanExcludePatternContainRegExp) : Bool |
|
Jump : Trigger |
Second folder: : String |
Visible Fields¶
Include:¶
-
name:
inIncludePattern
, type:
String
¶ If include patterns (separated by spaces) are specified, only entries matching at least one of these patterns are included in the list.
Regular expression (inCanIncludePatternContainRegExp)¶
-
name:
inCanIncludePatternContainRegExp
, type:
Bool
, default:
FALSE
¶ If checked, the include pattern can contain regular expressions.
Exclude:¶
-
name:
inExcludePattern
, type:
String
¶ If exclude patterns (separated by spaces) are specified, entries matching at least one of these patterns are excluded in the list.
Regular expression (inCanExcludePatternContainRegExp)¶
-
name:
inCanExcludePatternContainRegExp
, type:
Bool
, default:
FALSE
¶ If checked, the exclude pattern can contain regular expressions.
Current file pair:¶
-
name:
outCurrentFilePair
, type:
Integer
, persistent:
no
¶ The number of the currently selected file pair.
Total number of file pairs:¶
-
name:
outNumberOfFilePairs
, type:
Integer
, persistent:
no
¶ The total number of file pairs in the comparison list.
File in first folder:¶
-
name:
outFile1
, type:
String
, persistent:
no
¶ The absolute path to the currently selected file in the first folder.
File in second folder:¶
-
name:
outFile2
, type:
String
, persistent:
no
¶ The absolute path to the currently selected file in the second folder.