Inventor Engineer-To-Order (Read-Only)
Welcome to Autodesk’s Inventor ETO Forums. Share your knowledge, ask questions, and explore popular Inventor ETO topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 2
santosh-kul
364 Views, 1 Reply

How to delete a file

Hi,

 

I want to delete the already created log file.

 

Below is the code I am using for writing the log file.

 

Dim

LogFile AsUser = openFile(ProjectLocation() + "\Output\" + "log.txt",:WriteAppend)

Dim a AsAny = write (ErrTxt,LogFile)

Return closeFile (LogFile)

 

Thanks,

Santosh

1 REPLY 1
Message 2 of 2
FarrenYoung
in reply to: santosh-kul

After the file is closed, the following will delete it.

 

system.io.file.delete(ProjectLocation() + "\Output\" + "log.txt")

 

Thanks,

--Farren

************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report