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
6 views

Send file from Spring server to Angularjs client with web socket

I've always used rest web services to transfert file between client and server but now I have to make this through web socket. This is the scenary: user requires file download by page interface, so ...
-1
votes
1answer
29 views

Use Javascript to read all png files in a directory and display them on an HTML page

I have a directory full of png files and csv files. I want to some how loop through that directory and display all the png files onto a HTML page. Keep in mind that these png files don't have similar ...
0
votes
1answer
27 views

Send file to output screen with jQuery

I have a form: (shortened version) <form class="form-inline" id="parts-form" method="post" enctype="multipart/form-data"> <div class="form-group"> <label for="import-parts"&...
0
votes
1answer
24 views

Is there anyway that i can save my dataset into a file with .data extension?

I have a dataset which contains 3000 observations. It could be something like: data.frame(A=letters,id=1:26 ) I am looking for a way to save my dataset into a file with .data extension? An R ...
-2
votes
1answer
12 views

Detect file type from it's data

I wanted to know how do I know the file type only from the file data? I mean I have only the file data in python which I had to extract from ICMP messages in pcap file, but I don't know the file type ...
0
votes
0answers
5 views

How to clean text File in cycle?

The idea is this: The user enters the password and login data, the program writes them to the file. When you "register" again, the data from the file is deleted. I tried to make it through an empty ...
0
votes
0answers
12 views

How to create a TAR file with files and directories from scratch [duplicate]

I'd like to create a TAR file from scratch in memory with certain contents. First problem is that when I create the file with: my_tar = tarfile.open('test.tar.gz', 'w:gz') it creates it on disk as ...
3
votes
1answer
25 views

Duplicate/Copy same file N times

I have an R file that is stored in a directory on my computer. I would like to create 10 duplicates of this R file in an automatized way. The 10 duplicates of this R file should be stored in the same ...
0
votes
1answer
30 views

move file from azure vm to azure file storage

I have a Azure VM (Win 2016) where I have a folder where we have file coming every 5 minute. Now I want to create and Window Service which will run on Azure VM and if any file exist, it will move to ...
0
votes
0answers
8 views

flutter send email attachment

My flutter app is using flutter_mailer: ^0.1.0 to send email. It is working well without attachment. But If I add the attachments: [ x.path ], The app will quit immediately when I press the button....
0
votes
3answers
38 views

How to read the CSV based on encoding in Ruby on Rails

I used https://github.com/roo-rb/roo to parse the CSV file in Ruby on Rails. Code is following as data = Roo::CSV.new(obj.public_url, csv_options: {encoding: Encoding::ISO_8859_1}) There is an issue ...
0
votes
0answers
15 views

Visual Studio - Compile external source code with project

I have a global library directory and a project template for convenience with small private projects. I have /lib/, /include/, but I also need /src/ for the small libraries that aren't worth the time ...
2
votes
4answers
30 views

Why specify index range in order to write a while loop list in Python?

mean_temp.txt = city,country,month ave: highest high,month ave: lowest low Beijing,China,30.9,-8.4 Cairo,Egypt,34.7,1.2 London,UK,23.5,2.1 Nairobi,Kenya,26.3,10.5 New York City,...
0
votes
0answers
20 views

Rails copy part of a remote file

I'm trying to develop a software that for each function it opens an SSH connection to my remote server and copies part of my production.log file, this must receive the 100 last rows of my file, I'd ...
-1
votes
2answers
43 views

What exactly is a 'token' in terms of java?

So I'm working on this program that opens all .java and .txt files in a specified directory, and does some analyzing on these files. One thing my program is supposed to find is the "Most frequently ...
1
vote
2answers
28 views

splitting a file into multiple files with a key word using python

I have a large text file in python. I want to split it into 2, using a keyword. The file above the keyword must be copied to one file and the rest of the file into other. I want to save these files ...
-1
votes
0answers
4 views

How can I use Bootstrap 'readFile'?

var files; $("#input-b6").fileinput({ showUpload: false, dropZoneEnabled: false, maxFileCount: 1, mainClass: "input-group-m", allowedPreviewTypes: null }); $("#input-b6").change(...
1
vote
0answers
45 views

Why opening and iterating over file handle over twice as fast in Python 2 vs Python 3?

I can't work out why it's so much faster to parse this file in Python 2.7 than in Python 3.6. I've found this pattern both on macOS and Arch-Linux independently. Can others replicate it? Any ...
0
votes
1answer
15 views

shell script to match column and add new columns into table from file

I'm trying to write a shell script to compare two separate files, and add the x/y/objectID/Status/Data info to the first file, when the addresses and LocationID match. This is what my files look like: ...
0
votes
0answers
5 views

Get checksum of file inside download link

Most websites do not provide the checksum of file with download link. I want to compare checksum of file i downloaded and the source file. I can obtain the checksum of downloaded file with software ...
0
votes
0answers
3 views

How to Compare Two Hashes in seperate Files

I have 6 CSV Files: LMN Week1 System,name,plan,run A123,mev,28,12 B123,fsa,31,45 C345,ghd,52,34 LMN Week2 System,name,plan,run A123,mev,28,12 B123,fsa,31,45 C345,ghd,52,34 LRA Week1 System,name,...
0
votes
1answer
11 views

Upload file with Vuejs

i'm working in Laravel. i need to upload file with Vuejs. but it's not working. I add this code: Blade (File upload): <input class="form-control" type="file" > Script Vuejs : var app = ...
-1
votes
0answers
13 views

Issue With Python Login System (Reading Off External Txt)

I'm creating a login system that reads the authenticated user off of a txt file that is the folder. I'm entering the correct details, yet the program is still recognizing me as an unauthenticated ...
0
votes
0answers
32 views

No such file or directory with “-” as the name of the file

I'm trying to loop through the sub-directories, as follows: for root,dirs,files in os.walk(path): for directory in dirs: for files in os.listdir(path + '/' + directory): ...
0
votes
0answers
6 views

Flutter share file

I am using share 0.5.3 of flutter to share text and it works well. I would like to know to share txt/csv file (without convert a file to string) in flutter. According the the example here, it only ...
0
votes
1answer
38 views

Why is getline (from a file) to cout (that line) not printing the line?

This is my code here. ifstream inFile; ofstream outFile; string line, line2; inFile.open("DATA.txt"); outFile.open("DATA.txt"); getline(inFile, line); cout << line; getline(inFile, line2); ...
0
votes
1answer
48 views

How do I move a file after fclose() using C

I'm trying to move some .csv files from a directory "NotImported" to another directory "Imported" after each file fclose(). Unfortunately I couldn't find a way!
-1
votes
0answers
31 views

Integer's toString and parseInt doesn't seem to work [on hold]

I am working on a project which uses FileInputStream, FileOutputStream. I have to add 1 everytime addchild() runs, but it doesn't add any numbers. Is The Problem on toString or parseInt? public ...
1
vote
0answers
22 views

How to upload some files of any type to online server by sending data to PHP API using HttpClient in C# (Windows Form Application)? [duplicate]

My question resembles a lot of question but I have seen that my question is different. I wanted to apply CRUD operation on file uploading using C#(Windows Form Application). Here is the code I wanted ...
0
votes
1answer
10 views

Prevent get_valid_filename() from changing the filename of a file

I am migrating to Django a site that has a large set of files that are already uploaded on AWS. Some of these files have special characters or blank spaces, that Django overwrites, which then makes ...
0
votes
1answer
29 views

Salvage temporary zip file with Java FileSystem

I ran into an unexpected case while creating a zip file using Java's FileSystem API, where the disk space ran out in the process of creating the file. Because of a coding error, the source files ...
0
votes
1answer
23 views

How to rename files with sequential numbers with bash?

I have 308,000 files located in the same directory, which are named using important information I would like to keep: e.g. "f_500_0.1_0.005_150_25.gen" "f_500_0.1_0.005_150_26.gen" "f_500_0.1_0....
0
votes
0answers
28 views

How to replace the first and last character in multiple files in subfolder? [on hold]

How to replace the first and last character in multiple files in subfolders, using awk and/or sed
0
votes
2answers
55 views

Unable to create temporary file in Java

I have a Java method that takes byte array and String value as arguments and returns a File object. This is the code public File createTempFile(byte[] byteArray, String fileName) throws IOException { ...
0
votes
1answer
20 views

Pass a variable into File function in for loop cycle in NSIS

my problem is this: I cannot pass variable inside a for loop, it seems that it does not recognize the variable. It takes the string with the variable, but not the variable value. This is my code !...
1
vote
2answers
19 views

Linux cron job overwrite file

In case of cron job that creates an archive with a constant name will the archive be replaced with new one on the next cron job or terminated as the file with this name is already exists?
0
votes
1answer
16 views

Move file from FtpOutBoundGateway to another remote location with dynamic filename

I am using FtpOutBoundGateway to move one file to another remote location. As per spring documentation expression attribute is to used to supply "from" path and rename expression is used for "to" path....
0
votes
0answers
5 views

Unable to generate excel file from XLSX in ionic

I am creating excel file from user data but unfortunately its not generating file and even don't know what is the error so I can at-least try to solve that error. Specially this issue occur in iOS ...
1
vote
1answer
17 views

search for files and create conditions using gnuplot

Tell me please how to make a script using gnuplot: have folder: d:/data/ in which there are files in the format [text1][delta=text2][text3][mac=text4].csv need to create the script for all the ...
0
votes
1answer
43 views

How to read complete file if new line character '0A' is part of the file.

I am having a file without any new line character. It is a continuous file of byte stream. Say the whole file size is 100Kb. If nth Kb is having '0A', the file read terminates with that (checked with ...
0
votes
0answers
16 views

Download speed in webApp is slow

In my app (Angular 6), I'm using a .stl (a 3D file) viewer. When I try to do the http.get() call to get the file it takes 14.9 Seconds to download a content of 17.7MB, about 1.1 ~ 1.3 MB/Sec... If I ...
0
votes
0answers
11 views

Getting file content into byte[] corrupts the file

What I am doing:(Non-Working scenario) I am creating a docx file in ByteArrayOutputStream, getting it's content into byte[] array and returning it to caller method. Caller method is writing file on ...
-3
votes
0answers
14 views

File corruption after copy in linux and windows server [on hold]

I copied some files (more than 300GB) in 3 stages: 1- Copy from windows server to a external HDD with "Tera Copy" 2- Copy those files in a linux to internal HDD 3 Use those files in a windows server ...
0
votes
1answer
31 views

File not found in jar

I'm working in java swing application. I'm using icon images which is placed inside uploads folder. When i run my project it's working fine. I export my project as jar. When i run my jar file it show ...
0
votes
2answers
57 views

C language: read matrix from an input file

3 $ 0 0 0 2 0 -1 0 0 0 $ 0 1 -4 0 -1 0 0 0 0 First following is the input file that I want to read. I should read the 2 matrices in between $ marks and do some more operations with the two matrices. ...
0
votes
0answers
8 views

Problem of output log file when a bash script is submitted using qsub in shell

When i submit a bash script using qsub in shell, there was a problem: the output log file was always written after the script was done. The output file was empty when the program was running. The bash ...
0
votes
0answers
8 views

Ngram Tokenizer for files in Java

my goal is to create a program that takes in a file, reads it, parses it into tokens and spits back out the index with the relative and absolute frequency. I understand how to tokenize regular strings,...
0
votes
2answers
28 views

php max function returns min value from array

this is my first post. sorry if i did something wrong... anyways i have a file that gets updates by php and this is EXACTLY it: 31\n 127\n 131\n 124\n 144\n 142\n 133\n 133\n 9\n 0\n 22\n 18\n i ...
1
vote
1answer
39 views

Saving live output to file in python

This is taking all day to try to figure out why it's not working. This is with Python 3.6. The goal is to capture the progress from a command line, shred as an example. Shred would output line by ...
0
votes
1answer
50 views

C: Read ints from file and store in pointer array

I am trying to read integers from a file and store them in an array. Then, I want to write those values to a different file. Reading an writing are done in a separate file from the main file, where ...