You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does (Find-Module dbachecks).Version match (Get-Module dbachecks).Version.ToString()
CommandType Name Version Source
Function Import-DbaCsv 1.1.134 dbatools
Verified errors are not related to permissions?
Can duplicate in new/clean PowerShell session (clean = powershell -NoProfile)?
Version Information
Operating System (Name|Version):
PowerShell Version:
SQL Server (Edition|Version):
Steps to Reproduce
<--
PLEASE include as much information as possible if this is a bug report.
The more you include the faster we can identify the problem and get it fixed
-->
Attach any screenshots (if possible/allowed)
Attach output from PowerShell console (if possible/allowed)
Description of Bug
<--
PLEASE include as much information as possible if this is a bug
Explain what it does that you would like it not to do
or
What it doesnt do that you would like it to do :-)
--> $AllCSV = Get-ChildItem -Path $SourceFolder -Filter '*.csv' | Select -ExpandProperty Fullname | sort
foreach ( $csv in $AllCSV ) {
Import-DbaCsv -path $csv -SqlInstance $MyAppConfig.SQLServer -SqlCredential $cred
Move-Item -Path $csv -Destination $ArchiveFolder -Force ;
}
Move-Item : The process cannot access the file because it is being used by another process.
At C:\Users\itsme\Documents\Powershell\DEV\Import-Results\Import-Events2SQLServer.ps1:275 char:17
Bug Report
General Troubleshooting steps
Does
(Find-Module dbachecks).Version match (Get-Module dbachecks).Version.ToString()
CommandType Name Version Source
Function Import-DbaCsv 1.1.134 dbatools
powershell -NoProfile
)?Version Information
Steps to Reproduce
<--
PLEASE include as much information as possible if this is a bug report.
The more you include the faster we can identify the problem and get it fixed
-->
Description of Bug
<--
PLEASE include as much information as possible if this is a bug
Explain what it does that you would like it not to do
or
What it doesnt do that you would like it to do :-)
-->
$AllCSV = Get-ChildItem -Path $SourceFolder -Filter '*.csv' | Select -ExpandProperty Fullname | sort
foreach ( $csv in $AllCSV ) {
Import-DbaCsv -path $csv -SqlInstance $MyAppConfig.SQLServer -SqlCredential $cred
Move-Item -Path $csv -Destination $ArchiveFolder -Force ;
}
Move-Item : The process cannot access the file because it is being used by another process.
At C:\Users\itsme\Documents\Powershell\DEV\Import-Results\Import-Events2SQLServer.ps1:275 char:17
The text was updated successfully, but these errors were encountered: