Questions tagged as 'file'

2
answers

Error with FileOutputStream

I'm trying to save an image of ImageView in the gallery of my mobile device and the problem is that I'm always creating the directory where I want to save the image and then the path when I'm going to do the% % co tells me that it does no...
asked by 29.08.2017 / 14:30
1
answer

Delete a file with all its contents in Python

I would like to delete a directory that contains several files inside. It has the following structure: carpeta fichero1.txt fichero2.txt I tried to delete it directly with os.removedirs('carpeta') but it gives me the error...
asked by 20.09.2017 / 22:30
1
answer

Name a backup but that does not match the previous C #

My code makes a backup of a folder, if the backup folder exists it creates another by adding "_1" and if it does not exist it creates a new one. I do not know how to do it so that when there is more than one backup folder it automatically genera...
asked by 06.10.2017 / 09:42
2
answers

Open file from another location by relative path

I need to open a file that is in another directory that is being worked on, I tried with: open("../carpeta/subcarpeta1/subcarpeta2/archivo.log") but when I run the script I get:    FileNotFoundError: [Errno 2] No such file or directory:...
asked by 30.01.2018 / 05:27
2
answers

Go through directory and compare its files with those of another directory C #

I have to take the files from a directory one by one and look in another directory for a file with the same name. Once they match, I have to call mostrarResultadoComparacionPropiedades() passing their paths as parameters. My code is this:...
asked by 05.10.2017 / 09:30
2
answers

Hello I want to delete certain content from a folder

I have a simple doubt. I have generated some files in different formats (.csv, .txt, etc) I need to delete some. Specifically all ".csv" and those that end with "h + *. Txt" (with * any integer from 1 to 99). I've tried this: for arc...
asked by 26.01.2018 / 13:54
1
answer

Consult xml file from sql server with OPENROWSET

I'm doing a query to an xml file from a store procedure and when placing the direct route it works. the problem is that the route I want to pass it by parameters and throws me error when placed as variable DECLARE @XmlFile XML SELECT @XmlFile...
asked by 18.12.2017 / 14:04
1
answer

Upload files to specific folder

I want to upload a file to a specific folder, but I'm taking the route from a database query, but when I upload it, it saves it in the root path. $query = mysql_query("SELECT * FROM registros WHERE id_prod = '$id'") or die("consulta".mysql_err...
asked by 31.01.2018 / 20:14
0
answers

Increase the value of a column in a .csv file using php

I'm looking for some explanation or help on how to solve this problem: $s ='1245'; $f = fopen(__DIR__ .'/datos/saved.csv', 'r'); $result = false; while ($row = fgetcsv($f, 0, ',')) { if ($row[0] == $s) { $result = $row[2];...
asked by 05.10.2017 / 04:16
1
answer

Problem when creating directory on SDCard. Android Studio

I have the following code, in which I want to create a directory (E4) in the SD external memory, however, when I run it I can not create it, and I also want it to be in / sdcard / documents /, but I put it on in ** / storage / emulated / 0 / **...
asked by 25.11.2017 / 23:11