0

I need to get the full file path including file name information to handle later with PHP. I am running into many difficulties.

We can use a html form with the html

<form method="post" enctype="multipart/form-data">
<input type="file" />

However, to pass this information we need to the server, we actually have to upload the file, I do not want to do this as its wasteful, The reason being is that this project is just for my local machine, The file already exists on my machine.

A manual way of achieving this is to provide a input text field, and inserting the file(s) full location path here via another file navigation window(copy/paste), But this quickly becomes boring and requires to much work when using the tool often.

Any other suggestions to achieve this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
cecilli0n
  • 457
  • 2
  • 9
  • 20
  • I would like to refer you to see [this post](http://stackoverflow.com/questions/18789934/browse-button-without-file-upload-in-html) answered by @jumpingcode –  Feb 02 '14 at 08:21
  • also have a look at these two: http://stackoverflow.com/questions/1418193/how-to-get-file-name-from-full-path-with-php – soulemane moumie Feb 02 '14 at 08:30
  • and http://stackoverflow.com/questions/11955603/php-browse-a-file-then-get-its-path – soulemane moumie Feb 02 '14 at 08:30
  • Well that certainly sucks, I guess I would have to deal with this completely out of a browser elsewhere. – cecilli0n Feb 02 '14 at 08:33
  • 2
    This has nothing to do with complexity. You are trying to missuse the browser for something it is not designed for. You cannot blame the browser for that. – arkascha Feb 02 '14 at 08:34

2 Answers2

0

This isn't possible. This has been discussed before and the explanations they give there are good, so I won't repeat:

How to get full path of selected file on change of <input type=‘file’> using javascript, jquery-ajax?

Community
  • 1
  • 1
-1

paste following line under file tag,your problem will be solved webkitdirectory directory multiple

<input type="file" id="ctrl" webkitdirectory directory multiple/> 
resueman
  • 10,572
  • 10
  • 31
  • 45