19,502
社区成员
发帖
与我相关
我的任务
分享
// 搜索 cs_Exp_Path 路径,提取PDA上面指定目录下所有的txt文件
if (!cnflag)
{
return false;
}
try
{
if (!CE_Exp_Path.EndsWith("\\"))
{
CE_Exp_Path = CE_Exp_Path + "\\";
}
// BarcodeRef
OpenNETCF.Desktop.Communication.FileList flList_CJ = Sync_File.EnumFiles(CE_Exp_Path + "Contrast.txt");
string fName = "";
string ceFile = "";
string pcFile = "";
if (flList_CJ != null)
{
// MS_UpPath
Application.DoEvents();
for (int i = 0; i <= flList_CJ.Count - 1; i++)
{
fName = flList_CJ[i].FileName.Trim();
ceFile = CE_Exp_Path + fName;
if (!MS_UpPath.EndsWith("\\"))
{
MS_UpPath = MS_UpPath + "\\";
}
pcFile = MS_UpPath + fName;
//移动文件上来(覆盖老文件)
if (Sync_File.DeviceFileExists(ceFile))
{
Sync_File.CopyFileFromDevice(pcFile, ceFile, true);
Sync_File.DeleteDeviceFile(ceFile);
ll_msg.Text = "xxxx,已上传:" + fName;
lbMsg.Items.Insert(0, ll_msg.Text);
System.Threading.Thread.Sleep(200);
ll_msg.Refresh();
}
}
}
return true;
}
catch (Exception ex)
{
ll_msg.Text = ex.Message;
return false;
}
}