# Different results when running curator command at command prompt vs as a .bat file in windows

**URL:** <https://discuss.elastic.co/t/different-results-when-running-curator-command-at-command-prompt-vs-as-a-bat-file-in-windows/31804>\
**Category:** Elasticsearch\
**Created:** [October 7, 2015, 7:56pm UTC](https://discuss.elastic.co/t/different-results-when-running-curator-command-at-command-prompt-vs-as-a-bat-file-in-windows/31804 "2015-10-07T19:56:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![casieowen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casieowen/32/8734_2.png) [@casieowen](https://discuss.elastic.co/u/casieowen)\
**Post date:** [October 7, 2015, 7:56pm UTC](https://discuss.elastic.co/t/different-results-when-running-curator-command-at-command-prompt-vs-as-a-bat-file-in-windows/31804/1 "2015-10-07T19:56:15Z")

</div>

Hi,

Having an issue where I'm seeing different results when I run a curator command as a .bat file than I do when I run the same command manually at a command prompt in windows.

If I run the below manually at a command prompt in windows (as in, paste it into a command prompt and hit enter)

C:\temp\curator-3.3.0-win64\curator-3.3.0\curator.exe --loglevel INFO --dry-run --logfile C:\temp\curator-3.3.0-win64\curator-3.3.0\curator.log --host --timeout 180 delete indices --older-than 1 --time-unit days --timestring %Y.%m.%d --prefix casieo\_index-

I get

2015-10-07 12:39:22,724 INFO Job starting: delete indices  
2015-10-07 12:39:23,025 INFO Pruning Kibana-related indices to prevent accidental deletion.  
2015-10-07 12:39:23,025 INFO DRY RUN MODE. No changes will be made.  
2015-10-07 12:39:23,049 INFO DRY RUN: delete: casieo\_index-2015.10.04  
2015-10-07 12:39:23,082 INFO DRY RUN: delete: casieo\_index-2015.10.05

If I put the same command in a .bat file and run it (as an administrator), I get:

2015-10-07 12:37:59,855 WARNING No indices matched provided args: {'index': (), 'regex': None, 'newer\_than': None, 'prefix': u'casieo\_index-', 'exclude': (), 'time\_unit': 'days', 'timestring': u'm.d', 'all\_indices': False, 'older\_than': 1, 'suffix': None}

The same issue occurs if I pull --dry-run out. If I paste the same exact command (except minus the --dry-run) in at the command prompt and hit enter, I get:

2015-10-07 12:44:45,178 INFO Job starting: delete indices  
2015-10-07 12:44:45,338 INFO Pruning Kibana-related indices to prevent accidental deletion.  
2015-10-07 12:44:45,338 INFO Deleting indices as a batch operation:  
2015-10-07 12:44:45,339 INFO ---deleting index casieo\_index-2015.10.04  
2015-10-07 12:44:45,339 INFO ---deleting index casieo\_index-2015.10.05  
2015-10-07 12:44:45,483 INFO Job completed successfully.

If I run the .bat (again, as admin) without the --dry-run, I get:

2015-10-07 12:44:31,247 INFO Job starting: delete indices  
2015-10-07 12:44:31,352 INFO Pruning Kibana-related indices to prevent accidental deletion.  
2015-10-07 12:44:31,352 WARNING No indices matched provided args: {'exclude': (), 'timestring': u'm.d', 'newer\_than': None, 'prefix': u'casieo\_index-', 'regex': None, 'older\_than': 1, 'index': (), 'suffix': None, 'time\_unit': 'days', 'all\_indices': False}

Any ideas?

Thanks,  
Casie

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 7, 2015, 10:14pm UTC](https://discuss.elastic.co/t/different-results-when-running-curator-command-at-command-prompt-vs-as-a-bat-file-in-windows/31804/2 "2015-10-07T22:14:26Z")

</div>

Try setting `--debug` to get more info?

---

<div class="post-metadata">

**Author:** ![casieowen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casieowen/32/8734_2.png) [@casieowen](https://discuss.elastic.co/u/casieowen)\
**Post date:** [October 7, 2015, 11:08pm UTC](https://discuss.elastic.co/t/different-results-when-running-curator-command-at-command-prompt-vs-as-a-bat-file-in-windows/31804/3 "2015-10-07T23:08:20Z")

</div>

I'm attaching a snip of the command ran. I tried to attach all the debug info as a .doc, but this UI won't accept it. And it's too large to include here. There are a few references to the two indices that are caught as relevant when I run this manually. I don't see anything revealing in the log. Here is the end, as much as I can fit. You'll see it does reference the two indices that are caught as relevant if I run this manually, which are: casieo\_index-2015.10.05 and casieo\_index-2015.10.04:

2015-10-07 15:40:27,519 DEBUG curator.api.utils get\_indices:27 All indices: [u'casieo\_index', u'.marvel-2015.09.28', u'.marvel-2015.09.29', u'.marvel-2015.09.23', u'.marvel-2015.09.26', u'.marvel-2015.09.27', u'.marvel-2015.09.24', u'.marvel-2015.09.25', u'casieo\_index-2015.10.05', u'casieo\_index-2015.10.04', u'.marvel-2015.10.02', u'.marvel-2015.10.03', u'.marvel-2015.10.01', u'.marvel-2015.10.06', u'.marvel-2015.10.07', u'.marvel-2015.10.04', u'.marvel-2015.10.05', u'.marvel-2015.09.30', u'.marvel-kibana', u'iplocation\_2015.10.06', u'customers-v2', u'customers-v1']  
2015-10-07 15:40:27,519 DEBUG curator.cli.index\_selection indices:72 Full list of indices: [u'casieo\_index', u'.marvel-2015.09.28', u'.marvel-2015.09.29', u'.marvel-2015.09.23', u'.marvel-2015.09.26', u'.marvel-2015.09.27', u'.marvel-2015.09.24', u'.marvel-2015.09.25', u'casieo\_index-2015.10.05', u'casieo\_index-2015.10.04', u'.marvel-2015.10.02', u'.marvel-2015.10.03', u'.marvel-2015.10.01', u'.marvel-2015.10.06', u'.marvel-2015.10.07', u'.marvel-2015.10.04', u'.marvel-2015.10.05', u'.marvel-2015.09.30', u'.marvel-kibana', u'iplocation\_2015.10.06', u'customers-v2', u'customers-v1']  
2015-10-07 15:40:27,519 DEBUG curator.cli.index\_selection indices:89 All filters: [{'timestring': u'm.d', 'pattern': '(?P\m\.\d)', 'groupname': 'date', 'method': 'older\_than', 'time\_unit': 'days', 'value': 1}, {'pattern': '^casieo\_index-.\*'}] 2015-10-07 15:40:27,519 DEBUG curator.cli.index\_selection indices:94 Filter: {'timestring': u'm.d', 'pattern': '(?P\<date\>\\m\\.\\d)', 'groupname': 'date', 'method': 'older\_than', 'time\_unit': 'days', 'value': 1} 2015-10-07 15:40:27,520 DEBUG curator.cli.index\_selection indices:94 Filter: {'pattern': '^casieo\_index-.\*'}  
2015-10-07 15:40:27,520 INFO curator.cli.index\_selection indices:98 Pruning Kibana-related indices to prevent accidental deletion.  
2015-10-07 15:40:27,520 WARNING curator.cli.index\_selection indices:152 No indices matched provided args: {'timestring': u'm.d', 'newer\_than': None, 'older\_than': 1, 'time\_unit': 'days', 'suffix': None, 'all\_indices': False, 'index': (), 'exclude': (), 'prefix': u'casieo\_index-', 'regex': None} ![](https://us1.discourse-cdn.com/elastic/original/2X/9/9a3095b4bb464e508af95d32d9a9c86ee3c8411e.jpg)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 7, 2015, 11:22pm UTC](https://discuss.elastic.co/t/different-results-when-running-curator-command-at-command-prompt-vs-as-a-bat-file-in-windows/31804/4 "2015-10-07T23:22:40Z")

</div>

> [@casieowen](#):
>
> I tried to attach all the debug info as a .doc, but this UI won't accept it. And it's too large to include here.

Just use gist/pastebin/etc and then link to it 🙂

---

<div class="post-metadata">

**Author:** ![casieowen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casieowen/32/8734_2.png) [@casieowen](https://discuss.elastic.co/u/casieowen)\
**Post date:** [October 7, 2015, 11:31pm UTC](https://discuss.elastic.co/t/different-results-when-running-curator-command-at-command-prompt-vs-as-a-bat-file-in-windows/31804/5 "2015-10-07T23:31:27Z")

</div>

Wow! Didn't know about those! Here you go: [http://pastebin.com/KBRDH9yb](http://pastebin.com/KBRDH9yb)

---

<div class="post-metadata">

**Author:** ![casieowen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casieowen/32/8734_2.png) [@casieowen](https://discuss.elastic.co/u/casieowen)\
**Post date:** [October 15, 2015, 3:32am UTC](https://discuss.elastic.co/t/different-results-when-running-curator-command-at-command-prompt-vs-as-a-bat-file-in-windows/31804/6 "2015-10-15T03:32:50Z")

</div>

Just checking in to see if you have any ideas on this. Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:44pm UTC](https://discuss.elastic.co/t/different-results-when-running-curator-command-at-command-prompt-vs-as-a-bat-file-in-windows/31804/7 "2017-07-05T23:44:44Z")

</div>


