Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-05-05
8
Medium Priority
?
281 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Integration Management Part 2

916 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