Questions tagged [file-access]

Questions about programmatically accessing individual files. For questions about accessing a file system, use [filesystem-access]. Use either of these in conjunction with the applicable tag such as [contention], [security] or [capacity] to indicate the focus of the question.

Questions about programmatically accessing individual files. For questions about accessing a file system, use . Use either of these in conjunction with the applicable tag such as , or to indicate the focus of the question.

510 questions
-1
votes
1 answer

How to restrict images access from url?

I want to restrict the file access via url and also I need to allow from html view page. My code is like this means logo The attacker simply go to inspect element and copy paste the url and get the…
Sankar Smith
  • 338
  • 1
  • 5
  • 14
-1
votes
1 answer

Keep input we get from user in text file after we execute our python code again to get that input to show in the screen when we need it from text file

" Keep input we get from user in text file after we execute our python code again to get that input to show in the screen when we need it from text file " I am new to Python and I spend lot's of time to learn it well. We learned " File Access in…
-1
votes
2 answers

Counter stored in .txt file not incrementing

So I've just now edited the Code I've posted to make it much nicer to read... This first block of code is my Counter Code used for the hits on a succesfull submition button. But for some reason the value of $Total will not increase by 1 even tho it…
Mark
  • 103
  • 2
  • 11
-1
votes
1 answer

System.IO.File.Create file cannot download ? in mvc 5 asp.net

The file that is created by System.IO.File.Create cannot download like the file created by HttpPostedFileBase.SaveAs. My code: [HttpPost] [ValidateAntiForgeryToken] public ActionResult SaveasMP4(HttpPostedFileBase file) { …
hussein_moh
  • 27
  • 2
  • 11
-1
votes
1 answer

How to Write to a Certain Line in a File in VB

I know how to write to a file, however, I want to be able to write to a certain line. I have a large csv file which has many lines. I can only write to the last line (using the writeline) but I really want to write to line x of 50 lines. How do I…
-1
votes
1 answer

Problems reading and writing to a text file in C#

Ok so I have looked at every other question that relates to my problem and can't see where I am going wrong. My objective is to write the results of a dice simulator to a text file then read that contents into a listbox in C#. Here is my code so…
Cameron Briggs
  • 71
  • 1
  • 1
  • 8
-1
votes
4 answers

Chrome, not rendering pdf file without extension

I have this situation that is little bit hard to explain. I have this url that ends in this format of www..../samplePDF.HTM when I open the url in Internet Explorer, it reads the page as pdf (it doesnt care about the extension of .HTM), however when…
benji_r
  • 535
  • 2
  • 16
  • 34
-1
votes
2 answers

C# get a textfile from EACH folder,

I have a folder structure similar to this: HostnameA->DateTimeA->hashdumpDateTimeA.txt HostnameA->DateTimeB->hashdumpDateTimeB.txt HostnameA->DateTimeC->hashdumpDateTimeC.txt HostnameA->DateTimeD->hashdumpDateTimeD.txt My Goal: Given a folder(in…
Fukkatsu
  • 149
  • 1
  • 12
-1
votes
1 answer

Accessing files on LAN from ASP.NET

As it is mentioned in the title. I would like to build a mechanism allowing me to access different files on LAN and read their metadata values. I don't want to change those files, or create new ones. The problem is I would like to have a web…
Bartosz
  • 4,542
  • 11
  • 43
  • 69
-1
votes
1 answer

how to get a string from a java file by using only start and end position?

My .java file consists of a series of codes and each line is of variable size. The .java file is shown below: public class MyC{ public void MyMethod() { System.out.println("My method has been accessed"); …
Daro Royoss
  • 25
  • 1
  • 4
-2
votes
1 answer

Checks if file is in use but the retains possession vb.net

I want to test if a file is in use. The code as follows was provided and it works! The problem now is that if I want to open the text file via notepad my vb.net app which just checked if the file is in use holds retains possession over it. How do I…
LabRat
  • 1,996
  • 11
  • 56
  • 91
-2
votes
1 answer

Scanning multiple strings from the same line in a file (C)

im trying to scan (perhaps using fgets) 6 different strings from the same line in a file that is accessed by the program. i used the following struct to hold the 6 different strings: struct _entry { char subject[10]; char prof_name[10]; …
-2
votes
2 answers

File access permitted

i am going to deploy my web project to client. Clients want to run it on localhost. Is there a way that no one can access my code files and also can't copy it?
-2
votes
3 answers

Can I access file name and file type by using File.Exists

filepath variable is coming over UDP socket. And after my codes are below: string filename=null; string filetype=null; if (File.Exists(filepath)){ filename=?????; filetype=????; } Can I access file name and file type?
Hasan D.
  • 7
  • 4
-3
votes
1 answer

Python3 file accessing

Long story short I want to do a project but don't even know where to start or how to describe it for a google search. When I run my python file in the Command Prompt I want to be able put a text file next to it that my program will read. Like: D:>…
1 2 3
33
34