filepath:=@Prompt([LocalBrowse]; "Please select the File"; "3");jedoch löscht dieser Befehl bei mir das ausgewählte FileDer von dir gepostete Code KANN gar kein File löschen. Dafür ist er nicht vorgesehen.
Ich will eigentlich in der Variablen nur den Pfad haben, wo das ausgewählte File liegt.hast du doch
Interessant wäre auch eine Funktion, wo man das Defaultverzeichnis noch mit angeben kann. (siehe "D:\temp" oder so)Ja
Filepath:= @Prompt([LocalBrowse]; "Please select the File"; "3");
@Prompt([Ok];Filepath;Filepath); '<= HIER IST DAS FILE SCHON WEG
@If(Filepath = ""; @Return(1); "");
@If(@IsDocBeingEdited;"";@Command( [EditDocument]; "1" ));
FIELD $switch_attachment:= "visible";
@Command([RefreshHideFormulas]);
@Command([EditGotoField];"Attachments");
@Command( [EditInsertFileAttachment]; Filepath)Der von dir gepostete Code KANN gar kein File löschen. Dafür ist er nicht vorgesehen.Jo genauso sehe ich dies auch, daher verstehe ich dies ja leider nicht... :(
ZitatJA!? Gibt es da was!?
Interessant wäre auch eine Funktion, wo man das Defaultverzeichnis noch mit angeben kann. (siehe "D:\temp" oder so)
Ja
Zitat
Zitat
Interessant wäre auch eine Funktion, wo man das Defaultverzeichnis noch mit angeben kann. (siehe "D:\temp" oder so)
Ja
JA!? Gibt es da was!?
Ich wüßte nicht wie man den Promptbefehl sowas mitgeben kann. Vielleicht gibt es da ja auch noch andere Möglichkeiten.
PS: Vielleicht ist dies der Fall, wenn das nicht im Notes Data Verzeichnis liegt oder so!?
PDF Files gehen und TXT Files gehen wohl auch, wenn darin etwas enthalten ist. Ein leeres TXT File ist danach weg.Ist irgendeine Antivirus-Software aktiv?...
Ein leeres TXT File ist danach weg.Jetzt kommen wir der Sache schon näher. Dass das bei einem LEEREN Textfile passiert, hast du uns bisher verschwiegen.
Ist irgendeine Antivirus-Software aktiv?...auch ohne ist das Verhalten reproduzierbar
Problem
You have a LotusScript application where the user has to select a file using the OpenFileDialog method. In selecting a file of zero bytes the filename is returned but the file is then deleted.
Example to reproduce.
1. In the file system create a new empty text file - for example "c:\test.txt"
2. In a Notes database create a view action (or agent) with the following code
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim result As Variant
result = ws.OpenFileDialog(False) End Sub
3. Click the View action (or launch agent). The OpenFileDialog opens.
4. Navigate to c: and select the empty test.txt file. Click Open.
5. Check the file system on c:. You will notice that test.txt has been deleted from the file system.
Resolving the problem
This issue has been reported to Quality Engineering as SPR SODY855B7B.
If this is an issue for your application you should put in code to check if the file still exists. Alternatively you can mark the zero byte file as read-only.