f



comparing file sizes from files in a directory #2

comparing file sizes from files in a directory

Hello all!

I need some help with this function I was trying to make but came up
futile in. Basically I have this folder called 'original' and another
one called 'new'. In these folders there are .NIF files. Both folders
have the same subdirectory folder and file structure. So if there is
an "original/black/dot.nif" then there will be a "new/black/dot.nif".
The only difference between the two dot.nif files are that they may
not be the same file size. I'm trying to create a function that will
compare the dot.nif from the original folder with the dot.nif from the
new folder and delete the larger dot.nif (thus keeping the smaller one
wherever it may be). I would really appreciate some help.

Basically I tried listing the files into an array for each of the two
top folders (original and new) while trying to exclude subfolders. And
then I was going to run it through a loop to determine which of the
two files from the two arrays were larger/smaller.
0
majik92 (5)
3/13/2009 12:26:03 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

6 Replies
803 Views

Similar Articles

[PageSpeed] 17

Alvin wrote:
> comparing file sizes from files in a directory
> 
> Hello all!
> 
> I need some help with this function I was trying to make but came up
> futile in. Basically I have this folder called 'original' and another
> one called 'new'. In these folders there are .NIF files. Both folders
> have the same subdirectory folder and file structure. So if there is
> an "original/black/dot.nif" then there will be a "new/black/dot.nif".
> The only difference between the two dot.nif files are that they may
> not be the same file size. I'm trying to create a function that will
> compare the dot.nif from the original folder with the dot.nif from the
> new folder and delete the larger dot.nif (thus keeping the smaller one
> wherever it may be). I would really appreciate some help.
> 
> Basically I tried listing the files into an array for each of the two
> top folders (original and new) while trying to exclude subfolders. And
> then I was going to run it through a loop to determine which of the
> two files from the two arrays were larger/smaller.

Don't be so antsy.  When you ask a question on a newsgroup, give at 
least 24 hours for a response.  We're all volunteers and don't sit here 
all day just waiting for a question to be asked.

What's the code you've got so far?

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
jstucklex (14659)
3/13/2009 12:30:49 AM
On Mar 12, 8:30=A0pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Alvin wrote:
> > comparing file sizes from files in a directory
>
> > Hello all!
>
> > I need some help with this function I was trying to make but came up
> > futile in. Basically I have this folder called 'original' and another
> > one called 'new'. In these folders there are .NIF files. Both folders
> > have the same subdirectory folder and file structure. So if there is
> > an "original/black/dot.nif" then there will be a "new/black/dot.nif".
> > The only difference between the two dot.nif files are that they may
> > not be the same file size. I'm trying to create a function that will
> > compare the dot.nif from the original folder with the dot.nif from the
> > new folder and delete the larger dot.nif (thus keeping the smaller one
> > wherever it may be). I would really appreciate some help.
>
> > Basically I tried listing the files into an array for each of the two
> > top folders (original and new) while trying to exclude subfolders. And
> > then I was going to run it through a loop to determine which of the
> > two files from the two arrays were larger/smaller.
>
> Don't be so antsy. =A0When you ask a question on a newsgroup, give at
> least 24 hours for a response. =A0We're all volunteers and don't sit here
> all day just waiting for a question to be asked.
>
> What's the code you've got so far?
>
> --
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Sorry, I wanted to post on alt.php too, but accidentally deleted my
post on comp.lang.php. So I posted it again on both boards this
time...
It's not because of impatience. Sorry for any misunderstanding.
0
majik92 (5)
3/13/2009 12:53:59 AM
Alvin wrote:
> On Mar 12, 8:30 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> Alvin wrote:
>>> comparing file sizes from files in a directory
>>> Hello all!
>>> I need some help with this function I was trying to make but came up
>>> futile in. Basically I have this folder called 'original' and another
>>> one called 'new'. In these folders there are .NIF files. Both folders
>>> have the same subdirectory folder and file structure. So if there is
>>> an "original/black/dot.nif" then there will be a "new/black/dot.nif".
>>> The only difference between the two dot.nif files are that they may
>>> not be the same file size. I'm trying to create a function that will
>>> compare the dot.nif from the original folder with the dot.nif from the
>>> new folder and delete the larger dot.nif (thus keeping the smaller one
>>> wherever it may be). I would really appreciate some help.
>>> Basically I tried listing the files into an array for each of the two
>>> top folders (original and new) while trying to exclude subfolders. And
>>> then I was going to run it through a loop to determine which of the
>>> two files from the two arrays were larger/smaller.
>> Don't be so antsy.  When you ask a question on a newsgroup, give at
>> least 24 hours for a response.  We're all volunteers and don't sit here
>> all day just waiting for a question to be asked.
>>
>> What's the code you've got so far?
> 
> Sorry, I wanted to post on alt.php too, but accidentally deleted my
> post on comp.lang.php. So I posted it again on both boards this
> time...
> It's not because of impatience. Sorry for any misunderstanding.

You can't delete a post on Usenet.  Most servers will ignore it.  Once 
it's there, it's there forever.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
jstucklex (14659)
3/13/2009 1:11:27 AM
Alvin wrote:
> On Mar 12, 8:30 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> Alvin wrote:
>>> comparing file sizes from files in a directory
>>> Hello all!
>>> I need some help with this function I was trying to make but came up
>>> futile in. Basically I have this folder called 'original' and another
>>> one called 'new'. In these folders there are .NIF files. Both folders
>>> have the same subdirectory folder and file structure. So if there is
>>> an "original/black/dot.nif" then there will be a "new/black/dot.nif".
>>> The only difference between the two dot.nif files are that they may
>>> not be the same file size. I'm trying to create a function that will
>>> compare the dot.nif from the original folder with the dot.nif from the
>>> new folder and delete the larger dot.nif (thus keeping the smaller one
>>> wherever it may be). I would really appreciate some help.
>>> Basically I tried listing the files into an array for each of the two
>>> top folders (original and new) while trying to exclude subfolders. And
>>> then I was going to run it through a loop to determine which of the
>>> two files from the two arrays were larger/smaller.
>> Don't be so antsy.  When you ask a question on a newsgroup, give at
>> least 24 hours for a response.  We're all volunteers and don't sit here
>> all day just waiting for a question to be asked.
>>
>> What's the code you've got so far?
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
> 
> Sorry, I wanted to post on alt.php too, but accidentally deleted my
> post on comp.lang.php. So I posted it again on both boards this
> time...
> It's not because of impatience. Sorry for any misunderstanding.

back to Jerry's question.. show us what you have tried and what were the 
results?
0
maustin (1437)
3/13/2009 2:18:48 AM
On Thu, 12 Mar 2009 17:26:03 -0700 (PDT), in alt.php Alvin
<majik92@gmail.com>
<a0880824-aad3-407f-92ee-22f6ffb1858d@v15g2000yqn.googlegroups.com>
wrote:

>| comparing file sizes from files in a directory
>| 
>| Hello all!
>| 
>| I need some help with this function I was trying to make but came up
>| futile in. Basically I have this folder called 'original' and another
>| one called 'new'. In these folders there are .NIF files. Both folders
>| have the same subdirectory folder and file structure. So if there is
>| an "original/black/dot.nif" then there will be a "new/black/dot.nif".
>| The only difference between the two dot.nif files are that they may
>| not be the same file size. I'm trying to create a function that will
>| compare the dot.nif from the original folder with the dot.nif from the
>| new folder and delete the larger dot.nif (thus keeping the smaller one
>| wherever it may be). I would really appreciate some help.
>| 
>| Basically I tried listing the files into an array for each of the two
>| top folders (original and new) while trying to exclude subfolders. And
>| then I was going to run it through a loop to determine which of the
>| two files from the two arrays were larger/smaller.

I would use the date/time of the file.
You can change a file but the size is still exactly the same size as
the original.
0
jnorthau (270)
3/13/2009 9:18:46 AM
Jeff North wrote:
> On Thu, 12 Mar 2009 17:26:03 -0700 (PDT), in alt.php Alvin
> <majik92@gmail.com>
> <a0880824-aad3-407f-92ee-22f6ffb1858d@v15g2000yqn.googlegroups.com>
> wrote:
> 
>> | comparing file sizes from files in a directory
>> | 
>> | Hello all!
>> | 
>> | I need some help with this function I was trying to make but came up
>> | futile in. Basically I have this folder called 'original' and another
>> | one called 'new'. In these folders there are .NIF files. Both folders
>> | have the same subdirectory folder and file structure. So if there is
>> | an "original/black/dot.nif" then there will be a "new/black/dot.nif".
>> | The only difference between the two dot.nif files are that they may
>> | not be the same file size. I'm trying to create a function that will
>> | compare the dot.nif from the original folder with the dot.nif from the
>> | new folder and delete the larger dot.nif (thus keeping the smaller one
>> | wherever it may be). I would really appreciate some help.
>> | 
>> | Basically I tried listing the files into an array for each of the two
>> | top folders (original and new) while trying to exclude subfolders. And
>> | then I was going to run it through a loop to determine which of the
>> | two files from the two arrays were larger/smaller.
> 
> I would use the date/time of the file.
> You can change a file but the size is still exactly the same size as
> the original.

Even better to compare the md5 sums for the files, as you can open and save a
file without making a change.

-- 

  //Aho
0
user7 (4036)
3/13/2009 10:07:08 AM
Reply:

Similar Artilces:

comparing file sizes from files in a directory
Hello all! I need some help with this function I was trying to make but came up futile in. Basically I have this folder called 'original' and another one called 'new'. In these folders there are .NIF files. Both folders have the same subdirectory folder and file structure. So if there is an "original/black/dot.nif" then there will be a "new/black/dot.nif". The only difference between the two dot.nif files are that they may not be the same file size. I'm trying to create a function that will compare the dot.nif from the original folder with the dot.nif from the new folder and delete the larger dot.nif (thus keeping the smaller one wherever it may be). I would really appreciate some help. Basically I tried listing the files into an array for each of the two top folders (original and new) while trying to exclude subfolders. And then I was going to run it through a loop to determine which of the two files from the two arrays were larger/smaller. ...

compare file size with online file size
hi! Im trying to make something that compares 2 files. One of the files is on the users computer.... The other is on a website! Obviously what Im trying to do is compare the lastModified date, in order to update the file on the users computer if neccessary. Only problem is that I dont know how I can get the size of the file online without downloading it first... Any ideas? Would the HTTP "Content-length" header line help you? Some servers don't send that so sometime you wouldn't know ahead of time. But in general you can use the urllib module and then the info() metho...

files, directories, files, directories
Hi folks, I've been trying to make a decision and it's driving me crazy. Is a directory a file or is a directory NOT a file but a node? Should I have A) public interface IFile { IFileName FileName; IContent GetContent(); } public interface IDirectory extends IFile { } or B) public interface INode { INodeName NodeName; } public interface IFile extends INode { IContent GetContent(); } public interface IDirectory extends INode { } Method A is nice cause IFile becomes the base "Node" type and you can use names like "IFileName" which sounds nice compared to "INodeName" and fits with the "FileSystem" moniker. A has the disadvantage that IDirectory has a GetContent() method which isn't bad but can be considered a bit weird. It probably wouldn't be too hard to make users think of everything as a file. Method B is nice cause IDirectory doesn't have GetContent() -- that honour belongs only to IFile. B is at a disadvantage when it comes to naming: everything becomes a "Node". INodeName sounds rude compared to IFileName. This method feels more "pure" cause you're specialising features completely. Do you reckon I can get away with Method A? It doesn't seem as pure unless you spend a long time convincing yourself that (for all intents and purposes) a file *is* a node (it's just got a different name) and a directory *is* a file. A penny for anyone's thought...

Comparing 2 files to create a third file
Hi, I've got two files as follows: FILE 1 FILE 2 user5:12345 user3 user2:234239 user4 user3:34908 user5 user1:234342 user4:234993 and I want to use an awk script to generate a third file which contains the information contained in FILE 1 for only those users which are contained in FILE 2. So my FILE 3 in this sample would contain: FILE 3 user3:34908 user4:234993 user5:12345 Additional info: FILE 1 contains two fields separated with a ":" FILE 2 only has one field FILE 3 does not hav...

FAQ 5.2 How do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file? #2 325998
This message is one of several periodic postings to comp.lang.perl.misc intended to make it easier for perl programmers to find answers to common questions. The core of this message represents an excerpt from the documentation provided with Perl. -------------------------------------------------------------------- 5.2: How do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file? Use the Tie::File module, which is included in the standard distribution since Perl 5.8.0. ------------------------------------------...

FAQ 5.2 How do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file? #2 554047
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.2: How do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file? Use the Tie::File module, which is included in the standard distribution sinc...

about finding file size of mpeg-4 file #2
hi! I want to know how to find out the file size of vedio files or where the size is stored or how to calculate the size? ...

file.lastmodified
Here's my problem... I have a file on many many users remote machines (with different OS's, etc) and I want to have my program test the date that the file that they are using, against the date of the most current version of the program avialable online. I want the program to be able to "see" if the program has changed without having a large overhead of downloading the new file. However File.lastModified gives an absolute time that is different by machine, and therein lies my problem. Thank you for any comments/suggestions! > I have a file on many ma...

Comparing 2 files and writing diffirence to new file
Hi all I've got two files namely: FileOld FileNew I want to loop through FILEOLD and compare the records with the records in FILENEW. The records that is in FILEOLD and not in FILENEW I want to write to a new file called NEWFILE. My code looks like this but does not give me the correct results: OPEN(FILEOLD) OPEN(FILENEW) CLOSE(NEWFILE) EMPTY(NEWFILE) CREATE(NEWFILE) OPEN(NEWFILE) CLEAR(FILO:RECORD) CLEAR(FILN:RECORD) SET(FILO:SURNAME_KEY,FILO:SURNAME_KEY) SET(FILN:SURNAME_KEY,FILO:SURNAME_KEY) LOOP UNTIL EOF(FILEOLD) NEXT(FILEOLD) NEXT(FILENEW) TEMPSURNAME = FILO:SURNAME TEMPNAME = FILO:NAME GET(FILENEW,FILN:SURNAME_KEY) IF FILN:SURNAME <> TEMPSURNAME NEW:SURNAME= TEMPSURNAME NEW:NAME = TEMPNAME ADD(NEWFILE) TEMPSURNAME = FILO:SURNAME TEMPNAME = FILO:NAME . .. CLOSE(NEWFILE) CLOSE(FILEOLD) CLOSE(FILENEW) This is the only way I know how to do it, but the results is wrong. Please help Regards Nazla You have made a couple of errors in your routine. Here is what i would use. OPEN(FILEOLD) OPEN(FILENEW) IF EXISTS(NEWFILE) THEN REMOVE(NEWFILE) END CREATE(NEWFILE) OPEN(NEWFILE) CLEAR(FILO:RECORD) SET(FILO:SURNAME_KEY,FILO:SURNAME_KEY) LOOP NEXT(FILEOLD) IF ERRORCODE() THEN BREAK END FILN:SURNAME = FILO:SURNAME FILN:NAME = FILO:NAME ! i have no idea what your key looks like so i included this line GET(FILENEW, FILN:SURNAME_KEY) IF ERRORCODE() THEN NEW:SURNAME= FILN:SURNAME ...

Compare 2 File Dates/sizes
Hi, Anyone know of a utility which will compare 2 file dates and/or times and exit with errorlevel, or put something into environment variable. Nothing fancy, only need to know if files match or don't match. Stu/2 On 6 Dec 2003 15:12:02 GMT, Stewart Buckingham <nobody@microsoft.com> wrote: > Anyone know of a utility which will compare 2 file dates and/or > times and exit with errorlevel, or put something into environment > variable. Nothing fancy, only need to know if files match or don't > match. COMP.COM in your [bootdrive]\OS2\ will compare ...

portably encrypting a file system's partition, directory and/or file #2
Hi *, I have firewire and USB devices with partitions/logical drives, whole directories and/or files I would like to encrypt. The thing is that I need to be able to just plug in the thing on any x86 machine running a commercial OS that would just take it (and AFAIK the only filesystem that even a MAC would seamlessly 'mount' is vfat/FAT32) is there anyway to do that? I have read quite a bit about it and I still don't find exactly what I need. Also, why exactly does encryption belong in the kernel? I think once you make it a kernel-depending functionality 'portability...

tar file with . files and . directories
hi i want to create a tar file with all my . files and . directories in my home directory. i cannot create a tar file without having all my files in it is there a way to create such a tar file? thanx in advance cu hausi On Tue, 02 Mar 2004 23:00:47 +0000, Hannes wrote: > hi > > i want to create a tar file with all my . files and . directories in my > home directory. > > i cannot create a tar file without having all my files in it is there a > way to create such a tar file? > Not very clear what you want to do. If you don't want some files to be archived, use...

How to tar.gz a directory tree WITHOUT files greater than 30 MB file size?
How can I *.tar.gz a whole directory tree (say \home\myname\) but all files inside which are greater than 30 MB should not be included ? Matt Matt Stevens wrote: > How can I *.tar.gz a whole directory tree (say \home\myname\) but all files inside which are > greater than 30 MB should not be included ? Use "find -size" to generate a list of files less than a specific size. "man find" for more info. Then use "tar -T" to tar the files. "man tar" for more info. You might even be able to pipe them together (- for -T), although I've never tried....

Ada.Directories.Size wraps on over 2Gb files #2
Couple of things that I found so far: Ada.Directories.Size wraps on over 2Gb files returning negative number. I saw that was mentioned in In addition to that: In addition to that Ada.Direct_IO.Size returns 0 on the same while End_Of_File is permanently true. At the same time it is possible to write files larger than 2G. Types are all seem to be long integers, so it looks like truncation is being made somewhere in C code (?) Regards, George. On Mo, 10 Dez, gpriv@axonx.com wrote: [2GB limitation] > Types are all seem to be long integers, so it looks like truncation is > being made somewhere in C code (?) I cannot speak for Ada.Directories.Size as I have not looked closer at it, but the same 2 GB restriction is present on other parts of the GNAT libraries at present as well (i.e. the whole of adaint.c does not make use of O_LARGEFILE), so we ended up in coding our own binding to the open/read/write/close category of functions with something like this: #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE #define _FILE_OFFSET_BITS 64 #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #ifndef __MINGW32__ #define PERM (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) #define O_BINARY 0 #else #define PERM (S_IREAD | S_IWRITE) #define O_LARGEFILE 0 #endif And later on we do something like the following: int my_open(const char *pathname) { return open (pathname, O_RDONLY |...

FAQ 5.2: How do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file?
This message is one of several periodic postings to comp.lang.perl.misc intended to make it easier for perl programmers to find answers to common questions. The core of this message represents an excerpt from the documentation provided with Perl. -------------------------------------------------------------------- 5.2: How do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file? Use the Tie::File module, which is included in the standard distribution since Perl 5.8.0. ------------------------------------------...

Solution to synchronize 300,000 files over FTP without file by file comparing?
Need help to effectively synchronize 3 machines (XP pro, 2000 pro and 98SE) with 3 different FTP Servers (Titan, Raiden and Serv U) Each machines has about 15 Gigabytes in total of 300,000 15k to 900k TIFF files spanning 15 levels of 6000 folders. Servers are connected by broadband, upload transfer rate is 640K on 2 Servers and 4000K on 1 server. 100 to 200 new files are added in each server daily and not much files are modified (10 to 30 in total maybe) We are using WS_ftp synchronize utility performing Server A to B sync (3 hours) then A to C sync (3 hours) and A to B again (3 hours) to make the files identical. That is a full day job. And most of the time is used for scanning and comparing files. We can't schedule the job because the synchronization halt from time to time. We need to reboot the FTP server or the client and start the task again. I doubt it is caused by the large number of files with small size, we tried to synchronize 4 DVD movies between 3 servers and the whole process finished in half the time needed and never halt. Recently the synchronization is getting slower and those non technical staffs (those who created 6000 folders) are complaining. I have tried Availl replicate from Availl.com, but it doesn't seem to operate well for such a large number of files. tried Syncback from 2brightsparks, replicate locally is great, but across ftp doesn't get the job done. tried remote control each server and backup newly added files but the...

Import Multiple Excel Files into Multiple files or One Single File #2
Now, the code below seems ok to me, but when I run it, I get this error: Error in read_all_files_in_folder (line 27) xlswrite(fOut, numData, s); numData: empty 0x0 double %folders = {'C:\Users\Excel\Desktop\Excel_Files\'}; %# get input XLS files dName = uigetdir('.', 'Select folder containing Excel XLS files'); if dName==0, error('No folder selected'); end files = dir( fullfile(dName,'*.xls') ); files = strcat(dName, filesep, {files.name}'); %' %# prepare output XLS file [fName dName] = uiputfile({'*.xls' 'Excel (*.xls)'}, 'Output File', 'final.xls'); if dName==0, error('No file selected'); end fOut = fullfile(dName,fName); %# process NUM_SHEETS = 1; %# number of sheets per file for s=1:NUM_SHEETS %# extract contents of same sheet from all files numData = cell(numel(files),1); for f=1:numel(files) numData{f} = xlsread(files{f}, s); end %# rearrange data numData = cat(3,numData{:}); numData = reshape(permute(numData,[3 1 2]), [], size(numData,2)); %# write data to corresponding sheet of output XLS file xlswrite(fOut, numData, s); end How can I modify this code to import all files in the folder into separate variables (any number of Excel files become any number of Matlab variables)? Also, how can I make the code import everything into one single variable (all data in f...

file extention from file file location
Hi, I am new to perl (only working on this one problem) but I program in other languages. We have an upload script written in cgi. Can anyone tell me how to get the file extension from the variable $File1 (actual file location on uploader's computer) then find out if it is equal to "txt" Thanks in advance for not telling me to read the manual. Ron -- PLEASE NOTE: comp.infosystems.www.authoring.cgi is a SELF-MODERATED newsgroup. aa.net and boutell.com are NOT the originators of the articles and are NOT responsible for their content. HOW TO POST to co...

FAQ 5.2 How do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file? #3 554638
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.2: How do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file? Use the Tie::File module, which is included in the standard distribution since Perl 5.8.0. -------------------------------------------------------------------- The perlfaq-workers, a group of volunteers, maintain the perlfaq. They are not necessarily experts in every domain where Perl might show up, so please include as much information as possible and relevant in any corrections. The perlfaq-workers also don't have access to every operating system or platform, so please include relevant details for corrections to examples that do not work on particular platforms. Working code is greatly appreciated. If you'd like to help maintain the perlfaq, see the details in perlfaq.pod. -- Posted via a free Usenet account from http://www.teranews.com ...

File size vs. Directory size problem
Hi all, Got a bit of a problem I dont know how to go about. Basically my script takes 2 different directories, puts each file/sub directory into an array for each, sorts the array, compares them, and then spits out what is missing from each directory. Im really happy with this as it is my first real ruby script and it works a charm. Now I was wanting to add to it. Basically I want to take the size of each file and see if they are greater than 0, and if it is 0 then output the file. My problem is that a directory is returned as being of size 0. Obviously I dont care about the directory size i...

want to get content of one php file in another php file
i have one php file having content Contents of ex1.php file <body> <?php $content = "c://webserver/www/abc.php"; $handle = fopen($content, "r"); echo fread($handle,filesize($content)); ?> </body> this is reading abc.php file in which i m simply using an echo statement. When i execute ex1.php file i cant see the php statement of abc.php file content of abc.php file is <?php echo "hello";?> sarika wrote: > i have one php file having content > > Contents of ex1.php file > <body> > <?php > $content = "c://webserver/www/abc.php"; > $handle = fopen($content, "r"); > echo fread($handle,filesize($content)); > ?> > </body> > this is reading abc.php file in which i m simply using an echo > statement. When i execute ex1.php file i cant see the php statement of > abc.php file > > content of abc.php file is > <?php echo "hello";?> That's interesting, I've found out that it's the browser that's hiding <?php ?> tags within .phpx pages. Probably to avoid short tags scripts (on a server that doesn't allow them) from getting leaked by visitors who don't know about this browser trick, until the dev' realizes his error. Not a good thing, IMO; dev's should take care, themselves, and it's still not secure since the hidden string is still in the rendered source. And now we don't know how ...

Open .php file with PHP Designer 2007 by clicking the file in XP
In windows XP, I want to be able to click on a .php file and have it opened in PHP Designer 2007, Or right-click on it and have an "edit" menu option presented to me. I know how to tweak the registry to do this in general, but what would the command line look like in this specific case ? PHP Designer does not do this automatically. It is as if the program does not allow commandline options. It only opens with the last file used or a menu of recently opened files. ...

2 files, 2 sizes, identical md5sums
Hi, Is it possible to have 2 files that are different sizes, but have the same md5sum value? TIA, -T gamename wrote: > Hi, > > Is it possible to have 2 files that are different sizes, but have the > same md5sum value? > Quite possible, though rather unlikely. >Is it possible to have 2 files that are different sizes, but have the >same md5sum value? Yes, but it's very very ... very unlikely. In particular, it's very hard for a bad-guy to make a second file with the same md5sum. One idea is to be hard to forge documents for example a c...

workspace file size v.s. stored JPEG file size
I'm having some difficulty understanding why there is a difference in file size between an image in my workspace, the same image when I write it as a JPEG using imwrite(), and the re-read image back into my workspace. I know JPEG can be used a lossy format, which makes sense why the file size would be less, but my question is less about the whole lossy/lossless mode discrepancy and more about why I get two different values for the same file. Let me illustrate this with a brief example: %Make a 128x128 "image" - 16384 bytes img = uint8(randi(128,128)); whos img %Write the...

Web resources about - comparing file sizes from files in a directory #2 - comp.lang.php

Forbes.com Removes Post Comparing Facebook COO Sheryl Sandberg To Kim Polese
... Officer Mark Zuckerberg ) as Silicon Valley’s new It girl. That was one thing, and a fine thing. But when the article went beyond, comparing ...

Comparing Tech Companies by Revenue and Profit Per Employee, 2015
Two tweets from Dustin Curtis that tell a big story.

KidZilla - Counting, Comparing, Matching and Rhyming Fun for Kids! on the App Store on iTunes
Get KidZilla - Counting, Comparing, Matching and Rhyming Fun for Kids! on the App Store. See screenshots and ratings, and read customer reviews. ...

Comparing Satellites
jurvetson posted a photo: "This is our satellite here…. It has 10x the resolution of the big satellite there with one thousandth of the mass" ...

CNN Reporter OWNED For Comparing Cruise Experience To Katrina: We're On A Freaking Cruise Ship - YouTube ...
owned cnn comparing cruise katrina - CNN Reporter Smacked Down For Comparing Passenger's Experience To Katrina: 'We're On A Freaking Cruise Ship'. ...

Comparing Approval Ratings From Different Polling Firms - Rasmussen Reports™
Rasmussen Reports - The best place to look for polls that are spot on

Getting around Dubai: Comparing costs with other parts of the world
The reporters tasked with determining the best way to get from one end of Dubai to the other wanted to not only compare the costs with other ...

Menu comparing PM to quail an in-house joke, says restaurant owner
The menu that compared Julia Gillard's body to a cooked quail has been labelled an “in-house” joke by the owner of the Brisbane restaurant that ...

Lena Dunham criticised for comparing her Jewish boyfriend to her dog
... titled, 'Dog or Jewish Boyfriend? A Quiz', she asks readers to compare the similarities. Girls actor Lena Dunham has been criticised for comparing ...

Snapped: Comparing Nokia Lumia 1020, Samsung GS4 and HTC One camera quality
Nokia's brand-new Lumia 1020 Windows Phone packs one of the most unique phone cameras on the market today. Carl Zeiss Tessar lens; 41MP (forty-one-megapixel) ...

Resources last updated: 3/23/2016 5:07:39 PM