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
{{ message }}
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
warrenlbrown
changed the title
File.Move operation worked in v2.0.1, but now fails in v.2.2.1
Directory.Move operation worked in v2.0.1, but now fails in v.2.2.1
Apr 6, 2018
I'm a bit confused, are you performing a Directory.Move on the log file?
string srcFile = @"C:$Sherpa Software\Altitude\Agents\SP\Logs\2018_04_06.log";
System.IO.IOException: (267) The directory name is invalid: [C:$Sherpa Software\Altitude\Agents\SP\Logs\2018_04_06.log
@warrenlbrown: I guess the error is: (267) The directory name is invalid, and not a Directory.Move error.
Could you confirm/clarify or close this issue.
`This worked in v2.0.1, but fails in latest release v2.2.1
string srcFile = @"C:$Sherpa Software\Altitude\Agents\SP\Logs\2018_04_06.log";
string dstFile = @"T:$Sherpa Software\Altitude\Agents\SP\Logs\2018_04_06.log";
MoveOptions options = MoveOptions.CopyAllowed | MoveOptions.WriteThrough;
options |= MoveOptions.ReplaceExisting;
Directory.Move(source, destination, options);
Error moving C:$Sherpa Software\Altitude\Agents\SP\Logs\2018_04_06.log to T:$Sherpa Software\Altitude\Agents\SP\Logs\2018_04_06.log: System.IO.IOException: (267) The directory name is invalid: [C:$Sherpa Software\Altitude\Agents\SP\Logs\2018_04_06.log]
at Alphaleonis.Win32.NativeError.ThrowException(UInt32 errorCode, String readPath, String writePath) in C:\Users\brown.SHERPA\Downloads\AlphaFS-2.2.1\AlphaFS-2.2.1\AlphaFS\NativeError.cs:line 87
at Alphaleonis.Win32.Filesystem.FindFileSystemEntryInfo.ThrowPossibleException(UInt32 lastError, String pathLp) in C:\Users\brown.SHERPA\Downloads\AlphaFS-2.2.1\AlphaFS-2.2.1\AlphaFS\Filesystem\FindFileSystemEntryInfo.cs:line 404
at Alphaleonis.Win32.Filesystem.FindFileSystemEntryInfo.FindFirstFile(String pathLp, WIN32_FIND_DATA& win32FindData, Boolean suppressException) in C:\Users\brown.SHERPA\Downloads\AlphaFS-2.2.1\AlphaFS-2.2.1\AlphaFS\Filesystem\FindFileSystemEntryInfo.cs:line 297
at Alphaleonis.Win32.Filesystem.FindFileSystemEntryInfo.d__84
1.MoveNext() in C:\Users\brown.SHERPA\Downloads\AlphaFS-2.2.1\AlphaFS-2.2.1\AlphaFS\Filesystem\FindFileSystemEntryInfo.cs:line 459 at Alphaleonis.Win32.Filesystem.Directory.CopyDeleteCore(KernelTransaction transaction, String sourcePathLp, String destinationPathLp, Boolean preserveDates, Boolean emulateMove, Nullable
1 copyOptions, CopyMoveProgressRoutine progressHandler, Object userProgressData, CopyMoveResult copyMoveResult) in C:\Users\brown.SHERPA\Downloads\AlphaFS-2.2.1\AlphaFS-2.2.1\AlphaFS\Filesystem\Directory Class\Directory.Copy.cs:line 803at Alphaleonis.Win32.Filesystem.Directory.CopyMoveCore(KernelTransaction transaction, String sourcePath, String destinationPath, Boolean preserveDates, Nullable
1 copyOptions, Nullable
1 moveOptions, CopyMoveProgressRoutine progressHandler, Object userProgressData, CopyMoveResult copyMoveResult, PathFormat pathFormat) in C:\Users\brown.SHERPA\Downloads\AlphaFS-2.2.1\AlphaFS-2.2.1\AlphaFS\Filesystem\Directory Class\Directory.Copy.cs:line 748at Alphaleonis.Win32.Filesystem.Directory.Move(String sourcePath, String destinationPath, MoveOptions moveOptions) in C:\Users\brown.SHERPA\Downloads\AlphaFS-2.2.1\AlphaFS-2.2.1\AlphaFS\Filesystem\Directory Class\Directory.Move.cs:line 151
at SherpaSoftware.IO.LongPathTools.MoveFile(String source, String destination, Boolean overWrite) in T:\SVN WORK\Utils\DebugHound\Externals\SharedLibs\sherpaSoftware.Common\sherpaSoftware.Common\IO\LongPathTools.cs:line 2949
at SherpaSoftware.IO.Files.Move(String source, String destination, Boolean overWrite) in T:\SVN WORK\Utils\DebugHound\Externals\SharedLibs\sherpaSoftware.Common\sherpaSoftware.Common\IO\Main.cs:line 528
at sherpaSoftware.DebugHound.dlgMainForm.mnuMoveFile_Click(Object sender, EventArgs e) in T:\SVN WORK\Utils\DebugHound\DebugHound\dlgMainForm.cs:line 8490
`
The text was updated successfully, but these errors were encountered: