Thanks Jon, it's working now
On Wed, Oct 9, 2019 at 3:38 AM 'J Hawkesworth' via Ansible Project < ansible-project@googlegroups.com> wrote: > You would probably need to write like this: > > - win_shell: 'dir PackageDeploy*.* /b > {{directory}}\configurations\temp' > args: > executable: cmd > chdir: '{{directory}}\configurations\jmxterm' > register: list_out > > But its probably much better to use win_find module > https://docs.ansible.com/ansible/latest/modules/win_find_module.htmld as > the results will be easier to make use of than the contents of your > list_out registered variable. > > - name: find PackageDeploy files > win_find: > paths: '{{directory}}\configurations\jmxterm' > patterns: 'PackageDeploy*.*' > register: package_deploy_info > > Hope this helps, > > Jon > > On Tuesday, October 8, 2019 at 9:31:48 AM UTC+1, Uppara venkat wrote: >> >> Hi all, >> I'm trying to list the files with the name of "PackageDeploy" using as >> below but getting all other files also in the directory. >> >> - win_shell: 'dir PackageDeploy*.* /b >> {{directory}}\configurations\jmxterm > {{directory}}\configurations\temp' >> args: >> executable: cmd >> register: list_out >> >> >> Could you please suggest the right method for list the file with name ? >> >> >> Best regards, >> Venkat >> > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ansible-project+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/2bde5cb5-8089-4085-be75-d57983704fa2%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/2bde5cb5-8089-4085-be75-d57983704fa2%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Thanks& Regards, venkatesulu.U 8147041026 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAFMhZ_L8ZPpRKaxuMDao2nV%3DjgGZetaZzyi%2BV2CtRFNfqiKjTw%40mail.gmail.com.