Solved

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

Posted on 2009-05-05
8
271 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
 
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
asp.net mvc5 3 35
JavaScript error 1 33
ISS migration from IIS 6 to IIS 8.5 rendering problems 4 23
Spacing between controls 4 15
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…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now