<p>I need to count and check how much of some images is placed in folder od web server.
Example- images get names from <code>user_id</code>, and on example I have <code>user_id 27</code>, and my images are:</p>

<pre><code>27_1.jpg, 27_2.jpg, 27_3.jpg, ...
</code></pre>

<p>How to check and write to database this thing?</p>

<p>Thanks</p>

Once you know your path you can use IO.Directory.GetFiles() method.
```
```
IO.Directory.GetFiles("\translated\path","27_*.jpg").Count()
```
```
will give you what you're looking for.