However, this might be me being very dumb, but is there a way of 'saving' this new file name to the original. And could this then be automated to do more than one file at a time. Sorry I'm a bit new to this.
:confused:
Hye everybody i would like to know if exist a internet site where i can founs some interesting shell script very usefull
I need to transform hundreds names of files escribed in CAPITAL letter in minuscule letter
do oyu know a mean o do that that thanks to a script or a shell... (1 Reply)
I've done quite a bit of searching on this but cannot seem to find exactly what I'm looking for. Say I have a | delimited input file with 6 columns and I need to change the value of a few columns and create an output file. With my limited knowledge I can do this with many lines of code but want... (5 Replies)
Hi ..
I have one input XML and I want to convert into another XML using parameter mapping through Database through Unix shell script. But I dont have idea how to do that.
And how can I create xsl sheet if mapping is through database tables.
Please help me on this. (1 Reply)
Hi
I have one input xml file
<param name="EXTR_COL" valueDesc="AUTHD_RFLL" value="rx.AUTHD_RFLL" />
There is a mapping parameters in Database.
if EXTR_COL is present in input XML then it is mapped to fieldlist.
so the o/p XML looks like
<fieldlist>
<datasource... (1 Reply)
Hi all, I have to transform a XML file like this:
<?xml version="1.0"?>
<vocabulary>
<voc_id>102</voc_id>
<name>Vocabulary Name</name>
<description>Voc description</description>
<relations>3</relations>
<hierarchy>5</hierarchy>
<word>
<word_id>1</word_id>
... (1 Reply)
Hello all,
I've done a bit of clipboard transformation scripting using xclip before, piping contents with " xclip -o -selection clipboard " to grep, sed, awk, then back into the clipboard with " xclip -i -selection clipboard " ... but I am not a fantastically skilled user of either of the three... (4 Replies)
Hi Gurus!
I need to make some file transformations. Please help.
This is my input file. It has four columns with fixed width.
1 aaa bbbb cccc
2 eee dddd jjjj
3 fff gggg jjjj
4 hhh iiii cccc
5 kkk llll cccc
6 mmm nnnn oooo
7 ppp qqqq xxxx
8 rrr ... (1 Reply)
Hello Experts,
I need to transform rows into column using awk. I tried few things but failed to obtain desired output, as I'm fairly new to awk.
i/p file
100, READ, 12
100, WRITE, 8
100, SEEK, 1
142, READ, 2
142, WRITE, 34
142, SEEK, 3
O/p Needed
PROC_ID 100 142
READ 12 ... (2 Replies)
I do have an input text file of the following format with 1000's of lines
input file:
3386(11:11,Ani:0,Bri:1,ch:1,Jwe:0,Jor:0,LP:0,Lo:0,NS:1,al:1,bo:0,boy:0,bru:0,sh:0,cor:1,dum:0,ery:0,mac:0,mic:0)... (3 Replies)
Discussion started by: Kanja
3 Replies
LEARN ABOUT PHP
ziparchive.addfile
ZIPARCHIVE.ADDFILE(3) 1 ZIPARCHIVE.ADDFILE(3)ZipArchive::addFile - Adds a file to a ZIP archive from the given path
SYNOPSIS
bool ZipArchive::addFile NULL (string $filename, [string $localname], [int $start], [int $length])
DESCRIPTION
Adds a file to a ZIP archive from a given path.
PARAMETERS
o $filename
- The path to the file to add.
o $localname
- If supplied, this is the local name inside the ZIP archive that will override the $filename.
o $start
- This parameter is not used but is required to extend ZipArchive.
o $length
- This parameter is not used but is required to extend ZipArchive.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
This example opens a ZIP file archive test.zip and add the file /path/to/index.txt. as newname.txt.
Example #1
Open and add
<?php
$zip = new ZipArchive;
if ($zip->open('test.zip') === TRUE) {
$zip->addFile('/path/to/index.txt', 'newname.txt');
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
?>
NOTES
Note
When a file is set to be added to the archive, PHP will lock the file. The lock is only released once the ZipArchive object has
been closed, either via ZipArchive::close or the ZipArchive object being destroyed. This may prevent you from being able to delete
the file being added until after the lock has been released.
PHP Documentation Group ZIPARCHIVE.ADDFILE(3)