Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Hot folder scripting methodology. How do I tackle this? The decisions I make now will really effect the rest of the script.

$
0
0

So I am challenged to write a script that scrubs a series of folders and if there are items in said folders perform an action. Hotfolder stuff. The items are .jpgs in sub sub folders. So basically

$filestorage*FINAL JPEGS*.jpg 

If there is a jpeg in there run scripts that will automatically import it into our content management system and push out to specifically tagged machines which is the same name as the wildcard folder. I need to capture that wildcard folder as a string to pass onto the later portion of the script. I am trying to do

(get-item $filestorage*FINAL JPEGS*.jpg).parent.parent 

but nothing comes up. Presumably because I have 13 different wildcard folders with FINAL JPEG and .jpgs in each one. And it cannot differentiate between them.

Right now I have it set up as an if{else} statement that is going to run on set intervals. Is there a better way of tackling it?

submitted by /u/cboogie
[link] [comments]

The post Hot folder scripting methodology. How do I tackle this? The decisions I make now will really effect the rest of the script. appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Trending Articles