Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6925239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:45:50+00:00 2026-05-27T10:45:50+00:00

How can I write text files on c:? I can create files on d:

  • 0

How can I write text files on c:? I can create files on d: but why not on the other? Maybe there’s some restriction on that.

Here’s my code

openTxt.html

<html><head>
<script language="javascript">

function WriteToFile()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var FileObject = fso.OpenTextFile("C:\\LogFile.txt", 8, true,0); // 8=append, true=create if not exist, 0 = ASCII
FileObject.write("hey!")
FileObject.close()
}
</script>
</head>
<body onLoad="WriteToFile()">

</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:45:51+00:00Added an answer on May 27, 2026 at 10:45 am

    In general it is bad practice to access the client Operating System with javascript, and in many cases it is near impossible with some exceptions (like using an ActiveX control).

    Typically if you want to write a log file, that is more for server side coding. If you have a server-side platform behind this page, I would use a web service to handle your logging.

    Why write logs on the client machine?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way I can write text to a file from a certain
For CIL / MSIL, I can write the code in a text editor and
I'm trying to write a Google chrome extension so that I can highlight text
How can I write text entities to a dxf file? I found a script
How can I get Mathematica to export/save/write a text file with proper Fortan77 formatting,
In Cocoa, how can I write a string to a text file without replacing
In Oracle, you can write: update t set xml = updateXML(xml, '/a/b/text()', 'gaga') This
How can I write a semi transparent text on an Image (Jpg,Bmp), or a
How can I get an application to write debug text to the Event Log
How can I write mathematics formula in actionscipt2.0? As following: alt text http://www.freeimagehosting.net/uploads/bc5fee2333.png Thanks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.