Das Notes Forum
Domino 9 und frühere Versionen => Administration & Userprobleme => Thema gestartet von: Lotolt am 07.08.03 - 11:21:02
-
Hallo zusammen,
vielleicht kann mir jemand bei folgendem Problem helfen.
Ich suche eine Möglichkeit Dateiattribute von mehreren Dateien innerhalb eines Verzeichnisses aus notes heraus zu ändern.
Und zwar soll der User nach erhalt der Mail nur irgendwo klicken müssen und ein DOS-Befehl soll ausgeführt werden.
z. B. "Attrib -R -A -S -H".
Ein Versuch eine als Attachment angehängte Batch Datei (test.bat) mittels launch starten zu lassen schlug fehl, sie wurde nicht ausgeführt.
Ich muss dazu sagen ich bin Neuling im Notes Bereich und habe keinen blassen schimmer wie das gehen könnte.
Danke im voraus für die Hilfe
-
kannst du mit script und ein bisschen API bequem machen
Declare Function SetFileAttributes Lib "kernel32" Alias "SetFileAttributesA" (Byval lpFileName As String, Byval dwFileAttributes As Long) As Long
Sub Click(Source As Button)
'0 Normal (No Attributes)
'1 Read Only
'2 Hidden
'3 Read Only & Hidden
Call SetFileAttributes ("c:\temp\unzip.exe", 0)
End Sub
-
Hi,
das müßte dann aber an der Batch Datei liegen. Wie verhält die sich denn, wenn man sie einfach so lokal laufen läßt ?
Gruß
Ute
-
kannst du mit script und ein bisschen API bequem machen
Declare Function SetFileAttributes Lib "kernel32" Alias "SetFileAttributesA" (Byval lpFileName As String, Byval dwFileAttributes As Long) As Long
Sub Click(Source As Button)
'0 Normal (No Attributes)
'1 Read Only
'2 Hidden
'3 Read Only & Hidden
Call SetFileAttributes ("c:\temp\unzip.exe", 0)
End Sub
Hi,
du brauchst keine API-Funktion dazu. in Script gibt es eine Befehl dafür, nämlich SetFileAttr
Auszug aus der Hilfe:
Example: SetFileAttr statement
' This script creates a file and uses SetFileAttr to set the
' file attributes to Read-Only, System, and Hidden. It then
' uses GetFileAttr to verify the file attributes.
%Include "lsconst.lss"
Dim fileNum As Integer, attr As Integer
Dim fileName As String, msg As String
fileNum% = FreeFile()
fileName$ = "data.txt"
Open fileName$ For Output As fileNum%
Close fileNum%
SetFileAttr fileName$, ATTR_READONLY + ATTR_SYSTEM + _ ATTR_HIDDEN
attr% = GetFileAttr(fileName$)
If (attr% And ATTR_READONLY) Then
msg$ = msg$ & " Read-Only "
Else
msg$ = msg$ & " Normal "
End If
If (attr% And ATTR_HIDDEN) Then msg$ = msg$ & " Hidden "
If (attr% And ATTR_SYSTEM) Then msg$ = msg$ & " System "
If (attr% And ATTR_VOLUME) Then msg$ = msg$ & " Volume "
If (attr% And ATTR_DIRECTORY) Then msg$ = msg$ & " Directory "
Print msg$
SetFileAttr fileName$, ATTR_NORMAL ' Reset to normal
Kill fileName$
Aber wie Ute schon geschrieben hat, glaube ich auch das es an der Batchdatei liegt.
Axel
-
Wenn ich die Batch launche flackert kurz der Bildschirm und das wars.
Vielen Dank für eure Hilfe, ging super schnell!!!!!!