PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 06/06/2017 8:59 AM by  FireGeek21
Using SysCommand instead of .bat file
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
FireGeek21
Private
Private
Veteran Member
(141 points)
Veteran Member
Posts:61


Send Message:

--
06/05/2017 10:03 PM

    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
    Private
    Private
    Veteran Member
    (3076 points)
    Veteran Member
    Posts:1036


    Send Message:

    --
    06/06/2017 3:22 AM
    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
    Private
    Private
    Veteran Member
    (141 points)
    Veteran Member
    Posts:61


    Send Message:

    --
    06/06/2017 8:59 AM
    Thank you David! I really appreciate all that you have to offer here!
    You are not authorized to post a reply.