Solved

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

Posted on 2009-05-05
8
275 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
  • 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

821 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