Solved

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

Posted on 2009-05-05
8
277 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

734 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