Celero
Celero

Reputation: 483

Find "my documents" path with javascript

I would like to determine the path of "my documents" folder with Javascript. I need it to specify the folder where I could store the logs of my application.

Thanks

Upvotes: 2

Views: 3456

Answers (2)

Dr.Molle
Dr.Molle

Reputation: 117334

Use the SpecialFolders-method of the shell:

shell = new ActiveXObject("WScript.Shell");
pathToMyDocuments = shell.SpecialFolders('MyDocuments');

http://msdn.microsoft.com/en-us/library/0ea7b5xe%28v=vs.85%29.aspx

Upvotes: 2

Giann
Giann

Reputation: 3192

You can't access client file system with Javascript for obvious security reasons.

Upvotes: 1

Related Questions