Using SysCommand instead of .bat file

 2 Replies
 1 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
FireGeek21
Veteran Member Send Private Message
Posts: 84
Veteran Member

I have the following in a .bat file but we are moving to the cloud and cannot use .bat files.  How can I do the same thing using a syscommand node?  Or is there a different node/combination of nodes I should use to count the number of a certain type of files in a folder?

@echo off
setlocal enableextensions
set count=0
for %%x in (\\servername\appprodline\foldername\*.RQ500) do @(set /a count+=1 > nul)
echo %count%
endlocal

 

Thanks!

David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
You can use the File Access to list files that match your syntax. The output will be a comma separated listing, which you can treat as an array. Then simply get a count of the elements in that array.
David Williams
FireGeek21
Veteran Member Send Private Message
Posts: 84
Veteran Member
Thank you David! I really appreciate all that you have to offer here!