我编写一个程序,它应该读出mp3文件的id3标签,创建一个名为艺术家的目录,然后我想将mp3文件移动到特定的艺术家目录.
当我试图移动Mp3文件时,它不会将其移动到我创建的Musik目录的子文件夹(命名为艺术家).我只想移动Mp3文件,而不是重命名它们.
这是我的代码:
public void moveFiles(string path, string[] title, string[] artist,string [] songs)
{//loop through the title array
for(int i=0;i<title.Length;i++)
{// no artist no name
if (artist[i] == null)
{
i += 1;
}//check if sourceFile is existing
if (File.Exists(songs[i]))
{//check if destinationFile is existing
if (File.Exists((@"C:\Musik\" + artist[i] + songs[i])))
{//if delete
File.Delete((@"C:\Musik\" + artist[i] + songs[i]));
}
else
{ //move file from songs[i](sourcePath)to (destinationPath)
File.Move(songs[i],(@"C:\Musik\" + artist[i] + songs[i]));
MessageBox.Show("Das Lied " + title[i] + " wurde erfolgreich …Run Code Online (Sandbox Code Playgroud) 我是使用Appium在C#中测试的新手.我能够设置一切并运行测试.我使用UiAutomatorViewer来访问一些按钮,现在我需要点击按钮,但我刚拿到了Cont-desc.哪个FindElement(ByAndroidUIAutomator."")与cont-desc相关联?我尝试了一切,但我总是得到一个错误.我已经尝试使用TouchAction或鼠标单击此按钮.单击();没有任何工作......任何帮助都会很好.
提前致谢:)
