Archive failed

Mar 9, 2009 at 7:11 PM
I was able to import data to db but the archive step failed.

PS C:\Documents and Settings\rdameron\My Documents\WindowsPowerShell> . ./Write-SmoCsvToDb.ps1


    Directory: Microsoft.PowerShell.Core\FileSystem::C:\Documents and Settings\rdameron\My Documents\WindowsPowerShell\
    EDMSelfAudit\Archive


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         2/25/2009   9:20 PM            20090225
Move-Item : Cannot create a file when that file already exists.
At C:\Documents and Settings\rdameron\My Documents\WindowsPowerShell\Write-SmoCsvToDb.ps1:73 char:10
+ Move-Item  <<<< "$CsvDir*.csv" "$arcDir$((Get-Date).ToString(`"yyyyMMdd`"))"
Move-Item : Cannot create a file when that file already exists.

repeats 70+ times, then

C:\Documents: The system cannot find the file specified.

PS command prompt returns.  Data is imported to db.

Thoughts?
Coordinator
Mar 10, 2009 at 12:10 AM
I have not seen that issue. Try adding the whatif parameter to the 3 move statements in Write-SmoCsvToDb.ps1 to see which files are being moved. Keep in mind the file is being moved to a file of the same name with yyyyMMdd.