1
我想写一个简单的文件移动循环,但我知道我错过了几件事情。 1.可能缺少经过所有文件的变量,即文本,只移动文本文件,因此我需要一个变量,但不知道我将它放在下面的代码中。 2.我得到的错误消息是“必需属性'源''没有提供'MoveFilesPackage.LoopFilesMove.MoveToDestination'...但我想我明白了吗?我检查了我的拼写和大小写......但仍然没有显示高达:( 让我知道如果我缺少别的此运行的权利,并从一个目录移动数据文件到另一个:( BIML代码如下:BIML疑难解答文件移动
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Connections>
<FileConnection Name="File_Source" FilePath="\\pc1\Documents\HMS\" RelativePath ="true"/>
<FileConnection Name="File_Destination" FilePath="\\pc1\Documents\HMS\Archive_Test\" RelativePath ="true"/>
</Connections>
<Packages>
<Package Name="MoveFilesPackage" ConstraintMode="Linear">
<Variables>
<Variable Name="FileSource" Namespace="user" DataType="String"></Variable>
<Variable Name="FileDestination" Namespace="user" DataType="String"></Variable>
</Variables>
<Tasks>
<ForEachFileLoop Name="LoopFilesMove" Folder="User::FileSource" ConstraintMode="Linear" FileSpecification="*.txt">
<Tasks>
<FileSystem Name="MoveToDestination" Operation="MoveFile">
<Expressions>
<Expression PropertyName="Source" ExternalProperty="User::FileSource"></Expression>
<Expression PropertyName="Destination" ExternalProperty="User::FileDestination"></Expression>
</Expressions>
</FileSystem>
</Tasks>
</ForEachFileLoop>
</Tasks>
</Package>
</Packages>
</Biml>
foreachfileloop上的文件夹看起来不正确。它将得到'User :: FileSource'的字符串值而不是\\ pc1 \ documents ...看看我的文章[FileSystemTask](http://billfellows.blogspot.com/2014/02/ biml-file-system-task.html)虽然我没有明确使用MoveFile操作,但它应该变得明显 – billinkc
确定找到1个修复程序,但得到不同的错误信息,说“System.collections.DictionaryEntry Exception类型:ExpressionSyntaxException C:\ ...等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等于自动规划,达到并超过其许多相应的国家和地区的类似语言。 –
SteveB