Questions tagged [file-manipulation]
219 questions
0
votes
1 answer
PHP - file_put_contents file manipulation
I'm trying to write a PHP file on a server and to bypass the extension in the end.
This is the PHP file - 1.php:
I'm trying to bypass the PNG extension and to write a PHP…

user10434537
- 1
- 1
- 2
0
votes
2 answers
Break a zip file into INDIVIDUAL pieces
What I am trying to do is this;
I get these zip files from clients which are 1.5gb in general. They all include pictures only. I need to make them into 100mb files to actually upload it to my server. Problem is that, If I break my 1.5gb zip file, I…
0
votes
0 answers
File content manipulation shell scripts replacement
We do a lot of complex file content manipulations using shell scripts. Usually these are excel, csv and fixed-length-column files. Some of the operations we do are listed here.
We wanna evaluate alternatives to shell scripts for manipulating these…

rb8680
- 279
- 2
- 3
- 11
0
votes
2 answers
C# two pass image creation
So, I'm building a console application to generate 2D perlin(ish) noise that is split among multiple image files. The algorithm I'm using requires that I do the generation in two passes, one to create the seed for the noise, then to generate the…

Raxmo
- 57
- 5
0
votes
1 answer
How to delete a particular line from file in Python
def deleteEmployee(self,code,name):
with open("employee.data","r+") as file:
# data=file.readlines()
for num, i in enumerate(file,1):
print(i)
a=i[:len(i)-1]
if str(a)==str(code):
print("found at",num)
…

harshita soni
- 13
- 1
- 5
0
votes
1 answer
PHP - Directory viewer
So I'm working on a simple administrator page for my web server. I'm trying to create a simple file manager that lists directories/files and lets you change directory / edit files. I'm having a couple problems though. My first problem is that it…

AustinM
- 773
- 6
- 18
- 27
0
votes
1 answer
Add values that have same id in a text file
I'd like to know if there is a Windows command that enables to add two different values that have the same id in a file.
For example:
File :
id;value
01;25
02;12
01;2
03;21
03;-5
Result :
id;value
01;27 /* 25 + 2 */
02;12
03;16 /* 21 - 5 */

Z. Walid
- 5
- 4
0
votes
1 answer
(python3.6)How to check audio data from video file and move it effectively
I have a folder full of videos. Some of them have audio and others are mute( literally no audio stream).
My goal with the follwoing small program i've made is to move the videos without audio to a folder named gifs.
My questions is : How can i…

Clayden
- 3
- 2
0
votes
1 answer
a program that takes one command line argument and outputs the contents of the file to standard out.
I was assigned a program to write that uses file system calls to take a command line argument(assuming you pass in a text file address) and return the contents of said file. I have this code so far, but can't seem to figure out why my compiler is…

Douglas Speaks
- 3
- 2
0
votes
0 answers
List folder names matching specific wild card pattern
Matlab script shown below, lists all folders inside current directory. How can I list all folders which match specific wildcard pattern such as *pattern* or Sample*?
files = dir(pwd)
% Get a logical vector that tells which is a directory.
dirFlags =…

VSB
- 9,825
- 16
- 72
- 145
0
votes
1 answer
How do I copy all files of one specific type from a folder to another folder in Python
Im trying to copy a numerous amount of .txt files from one folder to another using a Python script. I dont want to copy one single file at a time, and im not even sure exactly how many txt files are present in the folder. I am looking to scan the…

Vib
- 3
- 1
- 3
0
votes
1 answer
How can I delete "read-only" excel files from a folder using R? { Preferably using the base functions like file.remove() }
When i attempt to remove a "read only" file, the error message reads 'Permission denied'. However if I manually change the "read only" property, it works fine. Is there a way to, in general, remove "read only" files? If not, is it possible for me to…

JimmyBuffet_Express
- 290
- 5
- 19
0
votes
1 answer
How to make a config file that stores global variables but can also be easily edited from the level of the code?
I have a Python project that uses some global variables. The project has multiple .py files and all of them need to be able to read those variables easily. All of them should also be able to edit them.
Right now I am using a .py file that stores…

Alicja Barankiewicz
- 111
- 1
- 13
0
votes
2 answers
Moving files to parent folder in R
I have a file structure similar to this:
D:/bu1/rp1/_archive/
D:/bu1/rp2/_archive/
D:/bu1/rp3/_archive/
D:/bu2/rp1/_archive/
D:/bu2/rp2/_archive/
D:/bu3/rp1/_archive/
D:/bu4/rp1/_archive/
D:/bu4/rp2/_archive/
and would like to move files form the…

Adam Khan
- 129
- 1
- 1
- 7
0
votes
1 answer
Creating multiple files in Python 3.xx
I am wanting to create single .xml files with a standard template in each, only a few key bits of data change each time.
This i can do, albeit a little messy.
The structure i want to automate is have a folder (already set up) where i run this…

Lloyd
- 75
- 5