文件名是目录名称的一部分,可以位于目录的末尾或开头。例如:
public static void NotifyStaticPropertyChanged(string propertyName)
{
StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(propertyName));
}
public static void NotifyStaticPropertyChanged<T>(Expression<Func<T> > property)
{
var expr = property.Body as MemberExpression;
if (expr == null)
throw new ArgumentException("Lambda does not contain member expression. () => MyClassOrObject.Property");
NotifyStaticPropertyChanged(expr.Member.Name);
}
您是否知道使用批处理文件的方法?
答案 0 :(得分:0)
这是一段示例代码,可以帮助您完成大部分工作:
@Echo Off
For /F "Tokens=1-2 Delims=-" %%A In (
'Dir/B/AD-S "*-*"^|FindStr/BRIE "[^-]*[-][^-]*"') Do For %%C In (
"%%A" "%%B") Do If Exist "%%~C.*" Move /-Y "%%~C.*" "%%A-%%B"