/    Sign up×
Community /Pin to ProfileBookmark

Deleting a file with activex and Javascript

So, using a little activex and javascript, you can create, append, and read a file. I have successfully done this using the information in this article:

[url]http://www.webreference.com/js/tips/001031.html[/url]

Is there a command to delete a file as well…any help is appreciated.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@felgallJun 24.2006 — Well the first link at the bottom of that page answered your question

http://www.webreference.com/js/tips/001111.html

I assume that this is for something on your own computer or an intranet because those activeX calls only work on Internet Explorer when security is set low enough (as otherwise it would be easy to write a script to wipe your hard drive clean as soon as you visited a web page).
Copy linkTweet thisAlerts:
@heirophantauthorJun 24.2006 — I think there are different links at the bottom of the page every time you load it, because I just checked the page and its not there. Thanks for finding it, though...its just what I needed.

Of course. This is for a computer that is not even hooked up to the internet. It also doubles as my cash register. I just figured it would be easier this way than writing script for a server and having that server run on this computer...not to mention easier setup. It is basically a bulletin board system based on activex. It saves js files that hold arrays that hold the information like a filename and the location of the file it creates. I just want to be able to delete these files when they are no longer necessary. Yes, I am well aware it only works on IE. I have already tested it and it works great. I overwrite the data for the files all the time and it doesn't show up in my list when I load the page because it is updated in the js file, but I just want to be able to delete the message to keep the directories more organized...thanks for the concern, though.
×

Success!

Help @heirophant spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...