Questions tagged [file]

A block of arbitrary information, or resource for storing information, accessible by the string-based name or path. Files are available to computer programs and are usually based on some kind of persistent storage.

0
votes
0answers
8 views

Having trouble to get a file to read properly for my final lab of the semester and keep running into problems with reading the actual file

So we have a lab to do and it involves reading files and all that fun stuff. This is what the txt file looks like: 22 1.2 Name1 22 2.71 Name2 19 3.51 Name3 18 3.91 Name4 20 1.6 Name5 19 1.03 Name6 ...
-2
votes
0answers
14 views

How to import and extract data from file? [on hold]

We have a problem with importing data from given file (https://dropmefiles.com/1dfsG) and extracting first two columns (we only need those columns). We are expected to import data using function ...
0
votes
1answer
17 views

Cant delete video file in Android

Problem : I want to delete video file from android device's internal storage. Below code is in class that extends BaseAdapter and "file.delete()" method returns false File fdelete = new File(...
1
vote
0answers
17 views

PHP - Uploaded File inside Function error

Hello fellow Stackoverflow users! I have a problem that I don't really undestand. I made a simple script that takes care of some uploaded attachments. It loops through all the uploaded images, and ...
3
votes
1answer
45 views

Why does open with :w and :append still overwrite the file?

I got the following code to try out file opening and writing (without spurt): sub MAIN { my $h = open 'somefile.txt', :w, :a; for 1..4 { $fh.put: "hello"; } $fh.close; } ...
0
votes
0answers
6 views

How to copy files using kohsuke github

I am working with org.kohsuke.github.*; I have a sample repository where I have a commit (sha) with a bunch of files which serve as a template. When I get a request on my app with a repo name xyz, ...
0
votes
0answers
15 views

How can I change downloading file name?(now it use default value)

I need to show file preview and when i click download, it use default file name. Can i set file name in this case: const win = window.open(); win.document.write('<html><head></head&...
0
votes
0answers
8 views

how to permission for audio file play on browser and not download

i have a c-panel host, i upload mp3 files, when i see on browser it's begin to download and not play How to fix when open in browser begin to play same the below sample and not download directly; my ...
0
votes
0answers
12 views

There is a Blank Space in My Music Paths Array

I have a media player that gets all the music on the phone and stores it in an array. However randomly during the debugging process this bracket appeared in the array list. I checked all the folders ...
0
votes
1answer
12 views

Open downloaded file using intent

I make a retrofit call to my own API that provides me a list of files with the following content: [ { "name": "Example_file.jpg", "ext": "jpg", "b64": "data in base 64 format" } ] I ...
0
votes
2answers
41 views

Remove double file contents

I have previously written a file in python and I wrote the same contents twice while trying to run the script for the second time. Here is my file content: Story1: A short story is a piece of ...
0
votes
6answers
49 views

How to generate a list starting from a string and ending with another?

I am trying to read a list of wavelengths from a text file containing a lot of other information but I can't figure out how to make python only start adding to the list after 'wavelength'. I can get ...
0
votes
0answers
9 views

Uploaded file not open from link in asp net core

I write upload file in asp net core and it work correctly. But after upload file i cant open it from link. all file assets open from their links. just only uploaded files. When i paste upload file ...
0
votes
2answers
37 views

How to find all the file names in a specific directory without using “dirent.h” (visual studio 2017 windows) in C

I have a mid-semester project, to make an anti-virus, that get as main arguments a directory and a path: The path is to a file that contains a virus signature. The anti-virus's goal is to scan all the ...
0
votes
0answers
17 views

Open a link to windows explorer from chrome or firefox [duplicate]

I'm developing a intranet website and I need to access some folders via links on my webpage. So, I did this: <a href="file://///MyServerAliasOrIpSameResult\MyFolder" ><img src="images/...
1
vote
1answer
29 views

How do I gain access to the documents folder (UWP)

When closing the UWP I will get a list of items from a database. I want to save this list in a file which will be created/edited in the documents folder. I tried to gain access to the Documents ...
0
votes
0answers
25 views

File Copy failing in Azure devops wwwroot folder from Asp.net Core

Copying File from source path to destination path I have Azure Path as D:\home\site\wwwroot\Templates . In Templates folder i have one excel file Named ExportTemplate.xlsx .which is static template ...
0
votes
0answers
25 views

Parsing a file to assign variables to strucuture. C++

Here is my code, I'm genuinely interested how far off I am. bool characterGetCFG(char typeOverLoad, string var_name, string full_text) { int pos = full_text.find(var_name) + 1; if (full_text....
0
votes
0answers
10 views

How do I create a 3d matrix in python from a list of csv file names

I have created a list of the .csv file names that I want to open and read into python. I want to be able to analyse these files in bulk through a 3D matrix with each of the file contents in a ...
1
vote
2answers
59 views

How to simplify this readLine() function?

I have this function and it reads first line of some .txt file and returns the line for me to work with it. I do NOT know how long is the line going to be so I can not have constant size of buffer. ...
0
votes
2answers
43 views

How do I get number of characters in each line?

I need to get number of characters in each line and then paste it into another file (school project) but even my prototype is already not working. I have already trying continuing seeing whether ...
-3
votes
1answer
32 views

FileNotFoundError: File b'.txt' does not exist

I'm trying to make a data frame from multiple .txt files. It may be important to say, those .txt files used to be .dat files, which I've just converted by changing the .dat to .txt. Anyway, it opens ...
0
votes
0answers
39 views

C - How do i compare values of binary files? [duplicate]

I have a program which supposed to compare a "Virus" file with other files to determined if they are "infected" or not. Infected file is a file which contains the data of the "Virus" file somewhere in ...
0
votes
5answers
53 views

File handling with Text

I am reading up a file with Text and integer in it. Need to extract the only integer skipping text. I have implemented the code reading integers but how to skip text coming in between and continuing ...
0
votes
1answer
28 views

how to set concrete working directory in multi module sbt project

I have package structure similar to below; myapplication/ ├── my-library/ │ └── src │ └──main │ └── scala │ ├── my-other-library/ │ └── src/ │ └──main/ │ └── ...
0
votes
1answer
15 views

file.txt content disappearing after calling the next function

I am trying to get my program to write over a simple config.txt file. Which is actually working: it writes the new content over the old one if one condition is met and proceeds to the next block. ...
0
votes
0answers
44 views

Read with python an txt file with password

I cannot open with python an txt file build with a password I have made an txt file protected with a password in CMD using this code: C:\notepad test.txt:pass -> where C:\ is the location, notepad ...
0
votes
0answers
33 views

How to “brute” a Batch-file game save file using Python

Let's assume that I have a Batch-File game that saves the user's data (such as health, gold etc...) in a file, so I want to load that data to my Python program and make the user capable of editting it'...
0
votes
2answers
26 views

Read files from Cloud Storage having definite prefix but random postfix

I am using the following code to read the contents of a file in Google Cloud Storage from Cloud Functions. Here the name of file (filename) is defined. I now have files that will have a definite ...
0
votes
1answer
18 views

How to save uploaded file in assets folder - angular

I have a requirement to save uploaded file into assets folder in angular. can any one share code to save. for back end am using asp.net services.
0
votes
1answer
18 views

initiate auto click of file input in on init of ts of component using angular typescript

I have this file input in html part of component. <input type="file" /> This component is dialog and I want to simulate click on that input inside ngOnInit() function so when the dialog opens ...
2
votes
1answer
43 views

Adding a string(line) to the specidifc position based on some criteria(in Python)

I have the following .sql file: execute_all.log set echo on SET SQLBLANKLINES ON @@2019-03-26_DX_1.sql @@2019-05-10_DX_2.sql @@2019-05-10_DX_3.sql @@2019-05-14_1600_DX_4.sql @@2019-05-21_0900_DX_5....
-5
votes
1answer
45 views

Is there a way to write an empty file but still not create it? [duplicate]

I use new File() to create a file in memory and then I want to write on it but not creating file in disk. File file = new File("hello.txt"); BufferedWriter writer = new ...
0
votes
0answers
37 views

Operations on file with multithreading

I'm trying to work with multiThreading and I want to write a code that must do some operations on a specific file called data.txt. There must be three writers and three readers,writer 1 has to write ...
-1
votes
0answers
24 views

how to convert colored multitif to wb?

I have a colored multi tiff file, and I want to convert it a white - black, in vb.net. Thanks!
0
votes
0answers
19 views

Issue with loading bar in JS

I've got this code to run a progress bar to match the progress of the upload of a file in JS, it was working fine but when I added a line of code and then delete it because I changed my mind about it ...
0
votes
0answers
12 views

I have to files 1:Read and Write CSV & 2: Dowload CSV. Combining and downlaoding doesnt work

So i have two files one reads an exsisting CSV edits and changes some values and then writes a new file. My goal is it that the new csv is then directly downloadable. It works in two seperate files ...
0
votes
3answers
18 views

Is file format different from file extension?

I don't understand how files are stored. I opened my text editor, wrote down some gibberish and saved it as .pdf, and then tried to open it with a pdf reader. The pdf reader could not open it. Someone ...
-1
votes
0answers
34 views

How to show the 5 most repeated records in an Array?

I have two text files that have customer records and cards So far I have, A record for each time a client is registered in the card file in the vector Now I need to know, the 5 most repeated clients ...
0
votes
1answer
19 views

Processing filenames in Python

I've written a function to strip double spaces out of my raw data files: def fixDat(file): ''' Removes extra spaces in the data files. Replaces original file with new and renames original ...
0
votes
0answers
23 views

I keep getting this error: Not allowed to load local resource

I have created my own local media server with html and I'm trying to access these files that are located on a different drive than to that of the website but it keeps outputting that same error: ...
0
votes
1answer
44 views

RandomAccessFile to modify a string at a specific line

Introduction I challenged myself with this proyect. I need to modify data at a specific line on a .txt without doing the next things: Loading everything on memory (Maps, Lists, Arrays...) Having to ...
0
votes
1answer
23 views

Python: Conditional combination of data from two json files into one csv file

I am trying to combine two different files that has different number of records. The first 150 records should be omitted from each file and next 400 records from each file should be combined into a ...
0
votes
1answer
33 views

Printing specific lines

having a problem when trying to print specific lines of a .txt file. The contents of the file are 1ºAmsterdao 1.1 PDI Casa de Anne Frank -Descricao: Museu biografico localizado na cidade de ...
0
votes
0answers
9 views

how create a link to local file

I would open this link with my browser: file:///sdcard/video.wmv if write it to the address bar, browser opens it. but if I create a link like this it won't open it: <a href="file:///sdcard/...
0
votes
1answer
39 views

Is it possible to list files that match a pattern with ls?

I want to list files of a directory with ls that match a pattern without using grep. Is it possible? The point is to retrieve all files that match this pattern '^\Extra_text_[0-9]\{10\}.csv' and ...
1
vote
2answers
21 views

How do I find something in a text file that is before a character

I have a text file and it has a company name before a dash "-" I want to find that company name example: TELSTRA - EV 12M FWD I have only found a way to access the dash import re hand = open('...
0
votes
1answer
29 views

OpenCV: Is possible to open Compressed Video in Java?

I have compressed .avi format video. I want to get frames from Video using OpenCV. public static void main(String[] args) { System.loadLibrary(Core.NATIVE_LIBRARY_NAME); String filePath ="C:\...
0
votes
1answer
18 views

How would I separate strings in a text file with a colon in python?

How would I loop through a text file and store a value. If I take a line from a text file, hello@aol.com:Password1, How would I store email as hello@aol.com , and password as Password1 ? file = open("...
0
votes
2answers
37 views

How to append to a file being used by “dotnet”

When I started catching and displaying my logging exceptions on my console application, I realized that quite a number of my log messages are absent due to the following error The process cannot ...

http://mssss.yulina-kosm.ru