Questions tagged [file-manipulation]

219 questions
0
votes
1 answer

How to automatically delete file older than 24 hours of a .pdf format in a specific folder with PHP

I keep getting many pdf file in my directory root/files/pdfs. I want a PHP script to automatically delete only the .pdf files from the pdfs folder that are older than 24 hours (86400 seconds). What permissions will the .php file require? Where to…
Saif
  • 2,530
  • 3
  • 27
  • 45
0
votes
1 answer

Loading a text file (map) in to an int array

I need to loop through a map that looks like the example bellow and get the width and height of it as well as the number at each point of the file. I then add a tile to that position (multiplied by size) width the parameters (x, y, width, height,…
jay
  • 7
  • 1
  • 1
  • 3
0
votes
1 answer

Removing the first bytes in a file

Is there a way to remove the first few bytes of a file (truncating it from the front) without using programs like tail or without having to read the whole contents of the file? That is because the file size might be hundreds of MBs or even GBs, so…
DeepWave
  • 1
  • 1
  • 2
0
votes
1 answer

Unity Create directory accessible by players

I am working on a game and want players to be able to place there own ships and islands into the game. I want players to be able to access folders which contain files which the ships use for configuration. How would I make and access these files?
SteamPunk_Devil
  • 169
  • 1
  • 8
0
votes
0 answers

How to split XML file in Oracle PLSQL

I have an XML file which I process by extracting tag values and inserting them into a table. The problem comes when the file has multiple entries of the same type, like the one below. Is there any way to loop between the xml tag or between the…
erni313
  • 193
  • 1
  • 2
  • 10
0
votes
1 answer

argparse for file manipulation

Should I be using argparse in python for file manipulation? All the examples online are about simple manipulation of the command line arguments itself. More specifically, I have 3 specific file manipulation tasks, let's call them a,b and c. For…
user1943079
  • 511
  • 6
  • 20
0
votes
1 answer

WinApi file mapping puts strange whitespaces between each symbol

I'm a newbie in WinApi programming. I'm creating a file mapping program. A user enters some string to the input and this text has to be put into a file. But in the file I get strange white spaces between each symbol. For instance, if I enter "Some…
serg66
  • 1,148
  • 1
  • 17
  • 31
0
votes
1 answer

Manipulate PDF via SQL

what I want to do is automatically create PDFs with data from SQL Server 2008 R2. After creation a string shall be added in the first line of the file. This "header" has to be clear text (right click PDF -> edit -> write string in the first line)…
bego
  • 99
  • 3
  • 9
0
votes
1 answer

Remove character from file in-place with native Windows tools

I'd like to remove the last character off a large file. The restrictions are that: the file has to be modified in-situ, without using the disk space required for a similar second file it's a windows machine I cannot copy any compiled code onto the…
Retiarius
  • 334
  • 2
  • 12
0
votes
3 answers

Bash: how to process variables from an input file?

I've got a bash script that reads input from a file like this: while IFS="|" read -r a b do echo "$a something $b somethingelse" done < "$FILE" The file it reads looketh like this: http://someurl1.com|label1 http://someurl2.com|label2 However,…
user187150
  • 15
  • 4
0
votes
1 answer

Programmatically shrink HPGL files via Java

I would need to programmatically (i.e. no human interaction) load HPGL files (coming from third party software) in Java and create a new HPGL file with different proportions (X ratio and Y ratio, passed as parameters to the program) Let's say that I…
0
votes
0 answers

Copy images from a set of text files into subdirectories

I have a folder with about 100 subfolders. In each of these subfolders, there are 4 text files and either 1 or 2 folders containing images and 4 currently empty folders corresponding to the 4 text files. In each text file, there is a list of images…
0
votes
4 answers

Does System.IO.File.Move not support previously-defined strings?

For example, something like this fails: string oldfile = (@"C:\oldfile.txt"); string newfile = (@"C:\newfolder\newfile.txt"); System.IO.File.Move(oldfile, newfile); Program crashes with "The given path's format is not supported." EDIT: I'm doing…
user1502648
0
votes
1 answer

Python: How do I print an unicode string from a .txt file

I'm using Python 3.2.3 and idle to program a text game. I'm using a .txt file to store the map schemes that later will be opened by the program and draw at the terminal(IDLE for the moment). What is in the .txt file is it: ╔════Π═╗ Π ║ ║w bb…
-1
votes
1 answer

How to get Path and name of the Uploaded file in Node.js

Well I am creating a react based web application in which I want to upload docx/pdf and convert it to pdf/docx. For security reason there is no way to get file path in react. I wanna use libreoffice-convert package for above reason in which one…
Avinash
  • 81
  • 1
  • 3