![]() |
![]() |
We are currently migrating this forum over to our HelpSystems domain. Please post all new threads in our new HelpSystems Community Portal. |
![]() |
|
![]() |
AutoMate Discussion | ![]() |
help :
faq :
home
|
||
Latest News:
|
latest topics : statistics |
Topic Title: Script Fails When Looping Files Topic Summary: Script works fine on single file but not when looping files. Created On: 08/05/2016 12:48 PM Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
||||||||||
The attached script works first uses the name of a single file ("SomeFile.PART01.RAR"), creates a substring of the the last 6 characters and then searches for "1.rar". That works; "1.rar" is found.
However, when the same thing is done by looping the files in a folder (containing "SomeFile.PART01.RAR"), "1.rar" is not found!? Very strange!??
Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder) |
||||||||||
|
||||||||||
![]() |
||||||||||
If I modify the script to not find the last 6 characters, but instead search for 1.rar in the whole filename; looping works fine.
Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder) |
||||||||||
|
||||||||||
![]() |
||||||||||
Hi Erik,
After reviewing the two sets of steps provided, I did notice an issue in the first set of steps. On the If text contains step during the loop, theFileNameLast6 variable is entered with percent signs. This means that the if statement if evalutating theFileNameLast6 text for 1.rar. If you add the % before and after to it, %theFileNameLast6%, then it will be able to pull the variable's value and work as intended.
------------------------- ![]() Justin Aucoin | Support Analyst AutoMate | Division of HelpSystems HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665 |
||||||||||
|
AutoMate Discussion
» AUTOMATE » AutoMate 9
»
Script Fails When Looping Files
|
![]() |
FuseTalk Enterprise Edition v4.0 - © 1999-2021 FuseTalk Inc. All rights reserved.