Anlage des Repos
This commit is contained in:
58
archive/Modules/MoveOrCopy-Item-4windream-withLogging.psm1
Normal file
58
archive/Modules/MoveOrCopy-Item-4windream-withLogging.psm1
Normal file
@@ -0,0 +1,58 @@
|
||||
#'Example for VBS '
|
||||
#=====================================================
|
||||
# login current user to current windream database
|
||||
#=====================================================
|
||||
# Dim Connect
|
||||
# Dim Session
|
||||
# Set Connect = WScript.CreateObject("Windream.WMConnect")
|
||||
#'=====================================================
|
||||
# create a session
|
||||
#=====================================================
|
||||
# MsgBox "Click OK to create a session. This may take some time."
|
||||
# On Error Resume Next
|
||||
# Set Session = WScript.CreateObject("Windream.WMSession")
|
||||
# lErr = Err.Number if lErr <> 0 then
|
||||
# MsgBox "Could not create session. Error: 0x" + CStr(Hex(lErr)) + " " + Err.Description
|
||||
# Err.Clear else
|
||||
# MsgBox " Session created. Click OK to login." end if
|
||||
#'=====================================================
|
||||
#' login session
|
||||
#'=====================================================
|
||||
# Connect.LoginSession(Session)
|
||||
# lErr = Err.Number if lErr <> 0 then
|
||||
# MsgBox "Login failed. Error: 0x" + CStr(Hex(lErr)) + " " + Err.Description
|
||||
# Err.Clear end if LoggedIn = Session.aLoggedin
|
||||
# If LoggedIn Then
|
||||
# MsgBox "Login ok. " + vbCRLF + vbCRLF + "Click OK to close session"
|
||||
# Else
|
||||
# MsgBox "Login failed. " End If
|
||||
#'=====================================================
|
||||
#' logout
|
||||
#'=====================================================
|
||||
# set session = nothing
|
||||
cls
|
||||
|
||||
$WMEntityDocument = 'WMEntityDocument'
|
||||
$SourceFile = "e:\test.txt"
|
||||
$TargetPath = "w:\Digital Data - Geschäftsprozesse\Manually\File\"
|
||||
|
||||
Try {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Catch {
|
||||
|
||||
}
|
||||
$windreamConnect = New-Object -ComObject "Windream.WMConnect"
|
||||
$windreamSession = New-Object -ComObject "Windream.WMSession"
|
||||
|
||||
$windreamConnect.LoginSession($windreamSession)
|
||||
|
||||
#IWMSession6 oIWMSession6 = (IWMSession6)oWMSession;
|
||||
$WMObject = $windreamSession.GetNewWMObjectFSFromFile($WMEntityDocument,$TargetPath,0,$SourceFile)
|
||||
$windreamSession.getnew
|
||||
|
||||
$test1 = Test-Path -Path "w:\system"
|
||||
write-host $test1
|
||||
Reference in New Issue
Block a user