Most voted "filing-cabinet" questions
A (Brazilian Portuguese) or (European Portuguese) computer file is a resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available to programs for use after the running program has been completed.
Learn more…693 questions
Sort by count of
-
0
votes2
answers63
viewsInput is not making sense
void cadastroturma () { char turma[30],caminho[100]; printf ("Diga o nome da turma a ser cadastrado:\n"); scanf ("%[^\n]", &turma);//Já tentei com gets e fgets getchar();//Já tentei sem esse…
-
0
votes1
answer195
viewsAppear Icone from the extension as per the file extension (doc, xls, pdf)
I’m on a demand for a php system. I am listing documents from a particular directory that is on the server in my html page <div class="tab-pane" id="docs"> <div class="table-responsive">…
-
0
votes0
answers172
viewsRead and write binary file in iteration
I’m doing a college job that requires us to create a system that records multiple read structures of the standard output into a binary file, leading to the need(?) for iteration usage. Unlike the…
-
0
votes1
answer432
viewsHow to change an attribute in a list of objects and write that list in a file
I have a list of objectsconList I want to change an attribute of an object and then write that list in a file, where each line of the file is an attribute of each object in the list. How do I do it…
-
0
votes0
answers120
viewsWarning: file(temp/20180114134402/.): failed to open stream: Permission denied
I am trying to give file() in a file in txt format but it gives this error use (localhost) and I tried to give permission... follows the code: line error: $data = file($linkfile); if…
-
0
votes0
answers59
viewsHow to use composite links - '.html file#secao'?
I made the following button: <a href="/../totem_app/xplaces/00_menu_vitoria_xingu.html#acru" target="_parent" class="bcontraste"><b>LINK</b></a> to go to <a…
-
0
votes0
answers1123
viewsFind File and Replace Word in XML or TXT
Hello, I have to create a DOS (Windows) command line script, which locates one or several files. xml that are located in a certain directory and change a value of a tag, this tag can be fixed, IE, I…
-
0
votes2
answers2097
viewsRead java txt file data and perform Java operations
I am making a vehicle rental company in java need to read from a txt the type of client(char) a date range(string) and the amount of passengers(int). I need to bring this data to be analyzed , for…
-
0
votes1
answer151
viewsHow can I open a file in a void function?
I am trying to open a text file in a function int abreArquivoEntrada, and for this I am sending as parameter the type pointer FILE and the one vector of char containing the file name, within the…
-
0
votes0
answers86
viewsI cannot remove element from the list
When I upload photos using FileUpload I can’t delete from the list where I’m adding. Use that StremedContent to be listed contentNova every time the method is called by FileUpload. The problem is…
-
0
votes1
answer245
viewsC separate string with commas in vectors
I want to separate each line of a file into 2 vectors: v[i]. date and v[i].value. However, when I run the code no value I print is correct, and the outputs are random values. There’s something I…
-
0
votes1
answer82
viewsHow to omit space to insert only numbers in different lists
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct NBIG{ int numero; struct NBIG *nseg; struct NBIG *nant; }Nbig; int main(int argc,char *argv[]) { char…
-
0
votes1
answer68
viewsAccessing the allocation causes program to stop working
I’m having a problem accessing a subscriber struct typedef struct Inscrito { char nome[50]; float cadastro; float nota; }; Inscrito *inscritos = NULL; it is as a global variable and every time I…
-
0
votes1
answer710
viewsCreate file without knowing directory? Python
It is known that it is possible to create a new file through Python through file_create = open(r'C:\Diretório\Diretório...\FileName', 'w'). However, it is necessary to indicate where this file will…
-
0
votes1
answer85
viewsBecause in this case I had to use freopen?
I have the following code: #include <stdio.h> int main(void){ FILE *ptr_file; ptr_file=fopen("archive.txt", "r"); short size=0; char c; while(!feof(ptr_file)){ c=getc(ptr_file); if(c=='\n'){…
-
0
votes2
answers254
viewsCreate files in the Home folder with C++
In c++, creating files is very simple, just include the fstream library and use ofstream arquivo; open file("variables.txt"); But this generates the file in the project folder and I would like to…
-
0
votes0
answers35
viewsHow to combine 2 binary files in 1 with regular interval?
I have a program called Interleave and it comes accompanied by a file Interleave.cpp and I’m trying to use this program to combine 2 files to result in 1 at regular intervals, but I’m not getting…
-
0
votes1
answer29
viewsHow to create file at runtime?
In my application, I need to convert a string that contains XML for RTF. The way I found to accomplish such a task is with the following code below, which uses files instead of strings. Then I would…
-
0
votes0
answers134
viewsHow to detect the end of a file reading in a while loop in C++
In my code, there’s the struct: struct material { int idmaterial; double rho; double precokg; }; And the reading function of a data vector of type "material", from a file:…
-
0
votes1
answer240
viewsMoving files in folders
I have a folder called test. Inside this folder there are 1000 subfolders from 1 to 1000. Within each of these subfolders there is another folder called Reports Inside each folder Reports there is a…
-
0
votes0
answers62
viewsSeparate a string in 2 from a file
I’m having trouble separating a consulted string from a file into two. the file is so alex 6461 anddre 979794 Douglas 6469794 Gustavo ... i want to pick the characters picked up on the line and…
-
0
votes3
answers1105
viewsReading Struct Strings with Wrong Scanf
Good guys, I am developing a C code that performs data registration in files. However, I have a problem in the function register, which you will see below among the codes. Struct of the client:…
-
0
votes1
answer1893
viewsCryptography in C
I am developing a program in C, which will be able to encrypt and decrypt texts and save them to disk separately. I want to use the ASCII table for the implementation of Cryptography, I am able to…
-
0
votes1
answer55
viewsHow to delete a file (not txt) in C?
I’m creating a program that puts each student’s grades in a different file. The user places the student’s code and this code becomes the name of a file that is not txt (I don’t know how to make it…
-
0
votes1
answer50
viewsDynamic upload input layout with gallery
Hello, I’m creating a resource where the mechanism should: choose an image in the input when performing input change, a new one is created via js next when I get there, I need help, because the…
-
0
votes1
answer386
viewsHow to make Tyscript read a JSON file that is on disk?
I have a code in Typescript (Nodejs-10.6.0) and need to create a variable that will recover the contents of a JSON file. I have tried to import the contents from the file in the following ways: 1.…
-
0
votes4
answers1283
viewsHow to save form image directory in the database
In the system I am developing has a form with a field where the user can attach an image. After saving the form, the user wants to view the record including the image, so I thought about saving the…
-
0
votes1
answer46
viewsFile function in C++
Hello I have a problem using the file function, I need to make a program that registers the place and the name of the person in a bus but the problem is that every time I close the program and open…
-
0
votes2
answers25
viewsListing files from a directory that start with a given text
I am working on the development of a page in html/PHP in which the goal is to perform the search for information on certain processes. For each process covered by the search filter the page displays…
-
0
votes1
answer68
viewsMonitor if files were inserted in a specific folder
Good morning friends, I would like an opinion or dirty from you in the following situation: In one of the company’s clients who work in the financial sector daily makes a download of an archive of…
-
0
votes0
answers103
viewsDoubt program that copies from one file to another in C with functions
I have to do a C job that copies one file to another at release time (on linux using argc and argv). I’m not used to file manipulation, but here’s the code and it’s not working, what can I do to…
-
0
votes1
answer91
viewsignore existing lines in the database when importing php file
I have the following line of code that performs the txt file import. <?php function Inserir($itens, Pdo $pdo){ $sts = $pdo->prepare("INSERT INTO dados(loja, cod_prod, cod_acesso, desc_prod,…
-
0
votes1
answer104
viewsUse of the getline() function in C with Mingw
I created code for a library collection using Linux/GNU, and it’s working perfectly. However, I need to Compile code on Windows using GCC, and wanted to know if there is a method to use this…
-
0
votes1
answer1456
viewsRemove data from a C++ file
I’m making a database to store names of rock bands. But I’m not able to implement band removal separately. Can anyone help? Follow the code. #include <iostream> #include <fstream> using…
-
0
votes1
answer156
viewsRead char matrix from a binary file
Function that writes and reads binary file: int FUNCAO_QUE_GRAVA_BIN (char filename[],int partida1,char resultado1) { typedef struct { int partida; char jogvelha[3][3]; char resultado; } velha;…
-
0
votes1
answer244
viewsStore the contents of a file in another - python file
I’m trying to read information from a file and save it in a new file, after passing all information to lowercase and removing punctuation characters. For this I created a Readfile() function that…
-
0
votes2
answers414
viewsStore a dictionary in a Python file
I have a function that counts how many times the words appear: def countWordExact(dataClean): count = {} dataFreq = [] for word in dataClean.split(" "): if word in count: count[word] += 1 else:…
-
0
votes1
answer407
viewsRead a text file and separate content into variables
I have a question about how to divide information from a text file into variables in C. Example, I have a txt file with the following data: 3 2 A D E AD DE I would like to read this file, and…
-
0
votes1
answer1272
viewsRename files with Python by dynamically adding numbering
I have a directory with many pdf lists, and want to rename the files dynamically. Ex: ~/teste/ |__ProjMed-Química-Físico.Química-quimica_propriedades_coligativas_exercicios.pdf…
-
0
votes3
answers75
viewsError reading all records from a.txt file in C
Can anyone tell me why this my code just returns the first record several times, instead of returns all the records? Function in the Code void listarDados(int quantidadeContatos) { char caracteres;…
-
0
votes1
answer112
viewsCreate new directory according to string
I have a function that saves an image in a default directory, for all companies, and I tried to change this to save in a directory according to this string companyFolderwhich I have created. Yet you…
-
0
votes0
answers39
viewsMove files in Python
I researched, and I saw people doing like this: import shutil shutil.move("este-arquivo", "/tmp") So I did it here in mine: import shutil shutil.move("arq.txt",…
-
0
votes1
answer59
viewsHow to hide files programmatically
A hidden file in a linux environment has a point (.) before its name, so that for example: .arquivo.c is hidden and arquivo.c isn’t. Knowing that, my question is, how to hide a number of files…
-
0
votes1
answer31
viewsFileinfo.Length gives wrong size
I’m trying to add the thumbnail, the name and size of a file to a ListView. I can add everything correctly except the size! I’m making Split PDF and I will add the information of each page to the…
-
0
votes1
answer1068
viewsList and Access Python subdirectories
Good afternoon guys, I’m trying to create a very simple text file management system, but in some of the difficulties I am found is accessing and manipulating files in subdirectories. Below I have…
-
0
votes0
answers92
viewsHow to resolve txt special character error
I’m using the library requests and the following code in Python to take data from Receita-WS and to JSON in a TXT. for i in lista_empresa: url = "https://www.receitaws.com.br/v1/cnpj/" + (i['cnpj'])…
-
0
votes0
answers27
viewsListview of simple files does not run
I have an application that at a certain time the user will list the contents of the folder containing some pdf’s that will be opened from this listing, however I can’t list the contents of the…
-
0
votes1
answer54
viewsCreate a label when reading data from a file
I am trying to create a button that, using the information deposited in 3 files (labelName, Labelx, Labely), create a number of cells according to the number of entries. That is, if I have 1 entry…
-
0
votes1
answer229
viewsNodejs send server files to server
Good afternoon, my friends, I am trying to send a file from an application of mine (in Node) to a web server made in PHP. But it is returning the message saying that the file parameter (arqCsv) was…
-
0
votes1
answer61
viewsProblem with reading file C language
Good evening guys. So I’m doing a two-step assembler, so I have to upload a file in the format. a and assemble a file in the format . mif, only when I make the first step to save the addresses of…