Should I use Continue activity to skip a certain file extension such as 'pdf'?

Hey guys,
I’ve used [For Each] to check every files in certain directory, and I have to make sure not to move PDF files in that directory.

so I used [If] activity with condition to check if that file ends with “pdf”, and in [Then] area, I just used [Continue] activity so that it goes to another file that exists in that directory.

I got confused all of a sudden so wanted to get doublechecked from you guys, or better if you have any advice.

Hi,

I think you’re right. Can you try actual workflow?

It might be better to use ToLower method and/or GetExtension method.

Regards,

Hi @Yoichi! using [ToLower] sounds really helpful! thank you.
but in case of [GetExtension], I’m currently following status quo of using “filename” variable, which used [ToString] to each filenames.
I guess I can also apply [ToLower] to my Substring of filename. Thanks for your help

Hi,

FYI, the condition will be as the following, if use GetExtension method.

System.IO.Path.GetExtension(yourPath).ToLower()=".pdf"

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.