Vbscript for delete file




















This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Please rate your experience Yes No. Any additional feedback? Submit and view feedback for This product This page.

View all page feedback. DeleteFile newpath end if file. Move newpath end if next. Salman A Salman A k 78 78 gold badges silver badges bronze badges. Salman A- I knew that it had to be something simple. I got all worked up over it and wasnt thinking straight. Works like a charm. Much appreciated. So you could use the block: if NOT fso.

FileExists newname Then file. DeleteFile newname file. Thanks for your response. I tested this as well and it works. Jon B Poonam Poonam 11 1 1 bronze badge. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.

Email Required, but never shown. AS in. If the files do NOT exist, it should check the next file on the list instead of exiting the program?? It might have something to do with the use of. If objFSO. FileExists sFile Then is the problem here. You need to check existence of myFile not sFile. Good catch Kul-Tigin. Add a comment.

Active Oldest Votes. Solution: If objFSO. DeleteFile myFile Else The Overflow Blog. Podcast Making Agile work for data science.



0コメント

  • 1000 / 1000