I need to browse to a folder to get the directory name by clicking a button, is there any way of getting this? I was thinking I could achieve this by using <input type="file" />
Asked
Active
Viewed 4,073 times
3

BalusC
- 1,082,665
- 372
- 3,610
- 3,555

Mohaimin Moin
- 821
- 11
- 22
-
If you want server side answers, add `nodejs` and `fileserver` to your tags. – georgeawg Apr 03 '16 at 21:46
1 Answers
3
For security reasons you cant. You can get just the file name, the rest is handled by the browser.
Answered here https://stackoverflow.com/a/15201258/1248388
More documentation on the File API https://developer.mozilla.org/en/docs/Using_files_from_web_applications

Community
- 1
- 1

Ed Knowles
- 1,925
- 1
- 16
- 24
-
Well, I have a issue that i want to read all csv/xls file from a folder and then cut paste to another folder. For this reason i need the path of From Folder and To Folder. I can do it directly texting but if there any way to browse it by a button click from my pc or any pc connected by network server with mine? – Mohaimin Moin Apr 03 '16 at 12:48
-
Or is there any way from server side i get the full folder path (N.B. need folder path actually not the file) ? – Mohaimin Moin Apr 03 '16 at 13:03