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
-
5
votes4
answers1277
viewsView last 5 lines of a PHP file?
Through the Shell, I can display the last 5 lines of a file through the command tail. Thus: > tail -n 5 public/index.php I would like to do the same thing in PHP. But I didn’t want to load the…
-
5
votes1
answer769
viewstxt file is not found when generating file. jar
I have an application in Java, this application has images, and I had the same problem: when generating the arch. jar(executable) the images did not appear, but if it ran straight into Netbeans, it…
-
5
votes1
answer1118
viewsRead file in C
I am doing a project in C, which is necessary to create and read a file. I am having difficulty implementing the reading. In reading I tried to apply fgets(), fscanf() and the fread(). But none…
-
5
votes2
answers1763
viewsComparing user typed variable with file variable
Inside of my file arquivo.txt I keep two strings "nome" and "senha", They lay one on the other. I need to take the name and password entered by the user and compare it with the name and password I…
-
5
votes2
answers1590
viewsHow to save files to a server via Java?
I need to save a file to a server using Java. In my case, I need to save a file json. I can save a file normally on my computer, but how do I save directly to a remote server? Below is an example…
-
5
votes1
answer537
viewsHow to open a password protected Word document?
I can normally open a file .docx in Word using the desktop.open java, but there is a case where I need to open the document that is password protected and Word opens asking for it. Is there any way…
-
5
votes2
answers601
viewsHow to take the path of the open executable in C
How can I capture the path of the executable in C and place it inside a string?
-
5
votes1
answer338
viewsOpen text file in Python package
I’m creating a Python package where one of my programs needs to open a text file to read some information. This file is in the same directory as my source. When I run the program in the interpreter…
-
5
votes1
answer146
viewsHow to view data from a serialized Java file?
I’m starting in Java and I need to make a system that registers students and saves their data in a serialized file. I can even create and save the data in the serialized file (I think rsrs) but I…
-
4
votes4
answers1341
viewsAn algorithm for finding repeated files?
I need to make a program that finds repeated files on my computer, so that the user decides what action to take with these files (e.g.: delete the copies). For now, I only care about a binary file…
-
4
votes2
answers437
viewsWhen do I use Objectoutputstream the parent class attributes are also saved?
When I use the ObjectOutpuStream to write to file, parent class attributes will also be saved?…
-
4
votes4
answers1914
viewsCheck if a file exists on the remote machine via FTP in PHP
How can I check if a file exists on the remote machine using PHP via FTP (English) in order to act accordingly? <?php $ficheiro = 'public_html/banana.xml'; $id_ligacao =…
-
4
votes2
answers5206
viewsFile supposedly being used cannot be deleted
I have a software that records error logs of itself inside a "logs" folder. Each log file is created with the current day date, so it is unique to the current day. Example: 30-04-2014.log. I use…
-
4
votes2
answers650
viewsCreating files in Haskell
I wanted to record the output of my program straight into a file. When I executed the code, I automatically generated a file with the outputs of this code instead of printing them on the screen. A…
-
4
votes1
answer487
viewsHow to use escape characters in a string in C#?
I am unable to scan a file that contains the EICAR (Standard Test File for Antivirus Scanning Methods) characters, as it contains escape characters such as " ", "()", "[]". I need a help to identify…
-
4
votes1
answer73
viewsCache control for a specific file
If we want to implement a cache control for a particular file type, through the htaccess we can proceed as follows: <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 1…
-
4
votes2
answers808
viewsHow to use Filter in Folderbrowserdialog
I would like to know how do I put a filter on certain files using c#. Good is more or less like this, I am making an application in c# that should open some types of files ( in the case .frm ), in…
-
4
votes1
answer2069
viewsHow to get a file back into an input type file field?
I have an html form that uploads a file and I can save it to a folder. The problem is that now I need to do the reverse operation, and return the file in this same input type file field so that the…
-
4
votes2
answers152
viewsPermutations and files
I’m working on a game that involves permutations, to create a list of words, in several separate files. Problems start to arise when I require words with more than 4 letters, as the corresponding…
-
4
votes1
answer158
viewsHow to receive input data from a C program from a file?
I have a program in C. Let’s assume that its name compiled is a.out (pattern). When I use the following command to execute it... ./a.out < arquivo.txt ...how do I read the content of arquivo.txt…
-
4
votes1
answer2475
viewsHow to popular a Jtable using a . txt file?
I wonder how do I make to popular one JTable using a pre-existing text file. I have a query table and I want the user when placing the account number, it shows the data on Jtable and also how I can…
-
4
votes2
answers1320
viewsSave user and password without database use
I am developing an application in C# of the kind Console, and I’m looking to save some sensitive settings like user, password and IP. The problem is, how to safely store this data locally without…
-
4
votes2
answers1001
viewsFind file on server
Good afternoon, I have a PHP file that looks for a txt to take the information and go up the SQL database, but this file is generated by the server here in the company (where my machine is already…
-
4
votes3
answers4312
viewsHow the end of file loop is done
Type, I know that the function feof() returns 0 if it did not find a file end and that it requires 1 parameter, which is the pointer_pra_variável_tipo_FILE, so far so good. If I do the while so it…
-
4
votes1
answer957
viewsHow to save text in XML or txt or HTML file?
I am developing a program in C# and would like to know how to save the text of a RichTextBox format .xml or .html or .txt.
-
4
votes1
answer92
viewsWhy is it possible to open serial ports (COM) on Windows using file functions?
How does this happen? There are other ways to open or just this Digo, in languages like C, PHP, Python, etc.
windows filing-cabinet language-independent serial-portasked 9 years, 1 month ago Guilherme Oliveira 43 -
4
votes1
answer893
viewsFile Exists PHP
I am using this function to check if the file exists: <?php header('Content-Type: text/html; charset=utf-8'); //header('Accept-Ranges: bytes'); $nome_real = $_FILES["Arquivo"]["name"];…
-
4
votes2
answers421
viewsHow to write a recursive function?
I’ve been tasked with making this function recursive, but I have no idea how to do that. int existe (int x){ FILE *arq; int y; char buf[MAX]; arq = fopen ("cliente.txt","r"); fgets (buf,MAX,arq);…
-
4
votes2
answers848
viewsDesktop application audit log
Thinking about a Java application desktop that is running in a company, we may come across situations that the user may cause failures in your application, in this case could create a log error and…
-
4
votes2
answers1276
viewsHow to lock an executable file and prevent it from opening on Windows?
I would like to create a particular program where I can block programs from running on Windows, I know that Windows itself provides something basic about this, but I wanted to create my program,…
-
4
votes1
answer1246
viewsPrint special characters in c that are in a.txt file with locale library. h
My college late semester program has several screens that print large texts from arquivo.txt, however, as I do in c language, some characters do not appear, such as ç, é, ã...And so on and so forth.…
-
4
votes1
answer715
viewsFile comparison
I need to compare files from different directories and show the differences. But I don’t want to list the name of the files, I just want you to make a comparison of the directories and show the…
-
4
votes5
answers5903
viewsCapture filename in directory
The following method takes the name of the files of a given directory and displays them on the screen, the problem is that the .listfiles() returns the number of bytes and not the number of files,…
-
4
votes2
answers375
viewsShould I compress files to save to the database?
I don’t want to take into account whether saving files in the database is a good practice. Since many systems save the files (images, pdf’s, doc’s, etc.) in the database, I would like to know if it…
-
4
votes1
answer9644
viewsHow to copy a Python file?
How to copy a file fonte to an archive destino in Python?
-
4
votes1
answer122
viewsRead elements from a file
Hi, I have a big problem! I have to read two very large numbers of a file and save each position in a list. I’m using fgetc to pick up each element, the two numbers are separated by a blank space,…
-
4
votes1
answer2598
viewsWhat is a. lock file?
I’m using git to convert a project and noticed when checking for modifications, that some files . json have a file with the same name, but with different extension and content. Example:…
-
4
votes1
answer359
viewsOverwritten txt file in C
My doubt is very basic: How do I stop, whenever I write something in a file (txt), always start recording after the information that was already written there? I mean, how do I not overwrite the…
-
4
votes2
answers1264
viewsHow to read a file with Kotlin?
I have a file .txt with some information I’d like to read to a string through Kotlin. I am a beginner in language and would like to know how to read a file with Kotlin.
-
4
votes1
answer414
viewsIs it dangerous to leave mod_mime_magic active in Apache?
Once I was arguing with a programmer more experienced than me (the user @Bacchus) about uploading files. I was commenting on it not making sense for someone to try to upload a file with extension…
-
4
votes1
answer161
viewsIs it possible to copy files without using a stream buffer?
In my application, I have a class that periodically performs a backup of a file, considerably small (less than 1MB), but I am doing some tests and after reading this answer, it seems to me that it…
-
4
votes1
answer214
viewsWhat is the difference between using the Enum Standardcopyoption constants?
I am implementing file copy and decided to use the class Files, and one of the signatures of the method copy() is to receive 2 parameters of type Path and a third of the kind CopyOption and this is…
-
4
votes1
answer1186
viewsHow to check if a File can be created in a Folder before trying to create it in it?
My program allows user to define a Folder, and later the program will create a New File in this Folder. However, the program is not able to create a File in any Folder, for example: Creates New File…
-
4
votes1
answer1077
viewsHow to read a list of serialized objects saved in a java file?
I wanted to work with serialization in java files and I read this tutorial about how to write the object in the file and this one on the how to read the file object Then I created the following…
-
4
votes1
answer298
viewsReading file in C
I use the following structure to read each line of a file: fclose(arq); // fecha o arquivo para em seguida abri-lo em modo leitura apenas arq = fopen(url, "r"); if(arq == NULL) { printf("Erro, nao…
-
4
votes2
answers350
viewsWhy is it necessary to close file?
Why is this line required in Java? fout.close(); Context: LinkedList values = new LinkedList(classe.getTurma().values()); if (!values.isEmpty()) { FileOutputStream fout = null; String FILE =…
-
4
votes1
answer199
viewsHow to save a Filefield template using a preexisting file?
I am importing a set of preexisting files to Django, and would like to refer them to my templates (which they use FileField or ImageField). For example, one of my models is like this: class…
-
4
votes2
answers163
viewsFile.Exists and the accentuation
I have a system developed in Webforms (Eca!) that checks the existence of an image to then display it. Everything is working correctly, however, when the image path has accents, the method…
-
4
votes2
answers250
viewsPrint struct data with read values from a text file in C
I’m trying to make a simple program to read data from a text file, store it in a struct, and print that data on the screen. The code I have is this:: #include <stdio.h> #define max 70 typedef…
-
3
votes2
answers1248
viewsHandling java/python/c directories
I have an A directory, and this A directory has several subdirectories, and in each subdirectory, it has a varied number of files. I would like to put all the files in a directory in the order they…