使用PowerShell获取名称末尾没有ID的用户名 [英] Get user names which doesn't have ids at it's end of the name using PowerShell

查看:71
本文介绍了使用PowerShell获取名称末尾没有ID的用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

Hi All,

我桌面上有一个文件夹(文件夹),其中包含文件夹A到Z作为文件夹-A .txt,folder-B.txt --- folder-Z.txt。

I have a folder on my desktop (Folders), which contains text files A to Z as folder-A.txt, folder-B.txt --- folder-Z.txt.

这些文本文件包含名称为"Achiu - Chioyim - Obou - 12345"。

我想查找名称末尾不包含任何数字的名称。

These Text files contains names as "Achiu - Chioyim - Obou - 12345".
I want find out names which doesn't contain any number at the end of the name.

我在Powershell脚本下使用,但无法成功。请帮帮我...

I'm using below Powershell script, but couldn't succeeded. Please help me on this..

推荐答案

您好

虽然你发错了地方。

我认为你修改的


id是一个局部变量,如果你只是想找到空数字文件并添加000000,只需将000000附加到if条件中的文件名。
id you modified is a local variable and if you just want to find the empty number file and add 000000, just append 000000 to the file name in the if condition.


这篇关于使用PowerShell获取名称末尾没有ID的用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆