Kill a file after running & closing

Florin M.

In my lotusscripy I create an external file, I "print" some lines in it, I close it and then I run it with the Shell function:

    Open "D:\testF.dsx" For Output As fileNum%
    Print #fileNum%, "line1"
    Print #fileNum%, "line2"
    Print #fileNum%, "line3"
    Close fileNum%
    result = Shell(|path "D:\testF.dsx"|, 1)

The shell function works fine, the file it's running.

After this I just put

    Kill fileNum% 'which should delete the file

Also, I've tried to add

    Sleep 2 'before the Kill statement but I get the same error: Path/file access error.

Thanks for your time!

  • Another alternative for my script will be to clear all text from the file => so the file will be empty.
Per Henrik Lausten

The Lotusscript kill statement expects a filename and not a file num. So do this instead:

Kill "D:\testF.dsx"

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Kill a file after running & closing

From Dev

Running a statement after closing JDialog

From Dev

How to exit GNU Octave, after running an m file, without closing plot windows?

From Dev

Thread still exits after closing project, how to kill it?

From Dev

Kill the long running queries after timeout

From Dev

Closing a ModelPopup after sending a file

From Dev

termios settings after closing file

From Dev

Error after closing file explorer

From Dev

Running process in background after closing terminal

From Dev

How to keep application running after closing the terminal?

From Dev

Closing an express server after running jasmine specs

From Dev

How to keep application running after closing the terminal?

From Dev

Cmd keeps closing after running the .bat

From Dev

pyinstaller program keeps running in background after closing

From Dev

How to make a script kill itself after running after a specific time?

From Dev

Batch file to start browser minimized and kill it after

From Dev

How to kill a script running in terminal, without closing terminal (Ctrl + C doesn't work)?

From Dev

How to kill a script running in terminal, without closing terminal (Ctrl + C doesn't work)?

From Dev

Tkinter window not closing after closed file dialog

From Dev

Read from file after write, before closing

From Dev

Deleting a file, opended by an external application, after closing it

From Dev

Closing file after using to_csv()

From Dev

Recover data after closing a Jar file

From Dev

VBA macros "deleted" after closing excel file

From Dev

Read from file after write, before closing

From Dev

file cannot be deleted even after closing streams

From Dev

Deleting a file, opended by an external application, after closing it

From Dev

Closing file after using to_csv()

From Dev

Can't kill workers after running R script

Related Related

  1. 1

    Kill a file after running & closing

  2. 2

    Running a statement after closing JDialog

  3. 3

    How to exit GNU Octave, after running an m file, without closing plot windows?

  4. 4

    Thread still exits after closing project, how to kill it?

  5. 5

    Kill the long running queries after timeout

  6. 6

    Closing a ModelPopup after sending a file

  7. 7

    termios settings after closing file

  8. 8

    Error after closing file explorer

  9. 9

    Running process in background after closing terminal

  10. 10

    How to keep application running after closing the terminal?

  11. 11

    Closing an express server after running jasmine specs

  12. 12

    How to keep application running after closing the terminal?

  13. 13

    Cmd keeps closing after running the .bat

  14. 14

    pyinstaller program keeps running in background after closing

  15. 15

    How to make a script kill itself after running after a specific time?

  16. 16

    Batch file to start browser minimized and kill it after

  17. 17

    How to kill a script running in terminal, without closing terminal (Ctrl + C doesn't work)?

  18. 18

    How to kill a script running in terminal, without closing terminal (Ctrl + C doesn't work)?

  19. 19

    Tkinter window not closing after closed file dialog

  20. 20

    Read from file after write, before closing

  21. 21

    Deleting a file, opended by an external application, after closing it

  22. 22

    Closing file after using to_csv()

  23. 23

    Recover data after closing a Jar file

  24. 24

    VBA macros "deleted" after closing excel file

  25. 25

    Read from file after write, before closing

  26. 26

    file cannot be deleted even after closing streams

  27. 27

    Deleting a file, opended by an external application, after closing it

  28. 28

    Closing file after using to_csv()

  29. 29

    Can't kill workers after running R script

HotTag

Archive