Questions tagged as 'arquivo'

3
answers

Filter specific file not to delete

How to make the code not delete a specific file I want among the .exe I get. Example: I want it not to delete "test.exe", but still keep erasing everything else. Follow the code: string[] arquivos = Directory.GetFiles(@"C:\temp\ae",...
asked by 28.05.2018 / 20:23
7
answers

Select a file by name in PHP

Good afternoon, I need help selecting a file for its name in PHP. I use the naming pattern starting with the file creation date in the format: 20160111_ALGUMA_COISA and I need my PHP to select only the file by the part until the DATA, ignoring t...
asked by 11.01.2016 / 18:23
2
answers

How to write a recursive function?

I was given the task of making this function recursive, but I have no idea how to do it. int existe (int x){ FILE *arq; int y; char buf[MAX]; arq = fopen ("cliente.txt","r"); fgets (buf,MAX,arq); while (!feof(arq)){...
asked by 29.11.2015 / 21:13
2
answers

Read file and save lines

I want to read a txt file by writing each line of the file into String variables, (which I use to save some data, from a basic program I'm doing) I thought of something like this try { FileReader fr = new FileReader("C:\Users\lucas...
asked by 20.11.2016 / 18:29
4
answers

How to create a regex to filter and delete files with a certain length in the name

I'm trying to figure out a way to delete files that windows duplicates when making multiple copies. I was able to do something by creating the code below: import java.util.*; import java.io.*; public class FileCreator{ public static voi...
asked by 25.11.2016 / 22:57
1
answer

Error creating file in C

I'm trying to create a file in C, but it's not working. The operating system is Linux. #include <stdio.h> void main (FILE *file) { file = fopen("/home/Documentos/teste.odt", "w"); fprintf(file, "alo\n"); fclose(file); }  ...
asked by 18.11.2014 / 00:08
1
answer

Is it possible to get a specific line of txt / csv file using an address?

Is it possible to access a line from a file txt / csv (example below) at its address directly without having to go through each line using C #?     
asked by 17.10.2014 / 20:06
1
answer

How to save an XLSX (Excel) file instead of CSV?

Today I have the code below, which saves a file in CSV format. What do I need to change to save in XLSX (Excel) format? public static void buildCSV(string filename = "resultado.xlsx") { Console.WriteLine("Escrevendo no a...
asked by 30.11.2018 / 22:23
2
answers

Generate txt file according to default layout in C #

I need to export data from a class according to a specific layout that consists of size and position. For easy maintenance, I need a simple layout change. Below is my class: public class NovosCotistasDTO { public string A...
asked by 16.07.2015 / 16:56
2
answers

Return the path value

How to return the value with the name of a folder in C #? Example, if I execute: Directory.GetFiles("%PROGRAMFILES% (x86)\MyApp", "*.*", true); And if you can do it, it returns like this: %PROGRAMFILES% (x86)\MyApp\MyApp.exe %PROGRAMFI...
asked by 27.09.2015 / 17:41