Solved

search for files on a users hard drive from a asp web form

Posted on 2009-05-05
8
278 Views
Last Modified: 2012-05-06
hello

i need a very simple way to search a users hard drive and see if a file is on it called test.txt with vb.net and asp.net
0
Comment
Question by:Chris Jones
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 6

Expert Comment

by:BALMUKUND KESHAV
ID: 24311334
Blingtec903, please refer the below link :
http://www.vbforums.com/showthread.php?t=341919

Bm Keshav
0
 
LVL 9

Expert Comment

by:tetorvik
ID: 24311382
unfurtunately there is no easy way to achieve this as browser security restrictions prevent client-side code from reading / writing to the client machine's filesystem. See this for more info
http://www.velocityreviews.com/forums/t300923-read-client-side-text-file-in-aspnet.html


0
 
LVL 1

Author Comment

by:Chris Jones
ID: 24311407
i can not get this exmaple to work
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 1

Author Comment

by:Chris Jones
ID: 24311463
so is there a plane vb program that i can scan the users c drive for that file and creat e atext file for the user to upload ? if so can i get an exmaple of a vbfile that can scan the c drive for a file
0
 
LVL 6

Expert Comment

by:BALMUKUND KESHAV
ID: 24312016
You know dos command to search a file in complete hard disk  like this :
make a batch file with following commands :
DIR C:\your filename.TXT /S
Run this batch file using vb shell command or by vb script in asp.web page .
If your filename is a variable then creat batch file in vb during run time and pass the filename.

Bm Keshav
0
 
LVL 6

Accepted Solution

by:
BALMUKUND KESHAV earned 500 total points
ID: 24312061
The following VB Procedure will demonstrate :

Sub makefile()
    Dim txtfilename As String
    txtfilename = Trim(InputBox("Enter File to Search"))
    txtbatchfile = "c:\batchfile.bat"
   
    Open txtbatchfile For Output As #1
        Print #1, "dir c:\" + Trim(txtfilename) + "/s >youroutput.txt"
        Close #1
    Dim tt
    tt = Shell(txtbatchfile, vbHide)
    MsgBox "Your result has been stored in Youroutput.txt file"
End Sub
0
 
LVL 1

Author Comment

by:Chris Jones
ID: 24325309
is there a vb gui form that you have that can better help me understand that
0
 
LVL 1

Author Closing Comment

by:Chris Jones
ID: 31578330
this works inda
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question