I have a program that will export my data to a single file, but it assigns a file name that is overridden every time I run the program. I need to change the file name to have a sequential number in the filename.
How do I rename a file so that the filename contains the system date and time. I want... (5 Replies)
Hi Guys,
I need to script the renaming of files as followins:
files:
firstjd
secondjo
thirdjv
My script needs to insert the date/time infront of the last 2 characters of the filenames above, any ideas greatly received :)
the letters before the last 2 characters could change, I'm only... (7 Replies)
Hi,
I operate and use HF radars along the California coast for ocean surface currents. The devices use Mac OS as the control and logging software. The software generates thousands of files a week and while I've used PERL in the past to solve the problems of finding files I come to realize some... (6 Replies)
Hi, i have a filename CRED20102009.txt in a server
20102009 is the date of the file ddmmaaaa format
the complete route is
/dprod/informatica/Fuentes/CRED20102009.csv
i want to extract the date to create a new file named Parameters.txt
I need to create Parameters.txt with this... (6 Replies)
I have lots of files in this format:
dvgrab-2003.06.29_15-30-24.mpg
The numbers represents the date and time (YYYY.MM.DD_HH-MM-SS)
How can I extract the dates from the filenames, and use the dates in the file timestamp?
I guess this can be done by using "find", "sed" and "touch"?
Can... (6 Replies)
Hi,
There are similar kind of posts, but none seems like working for me. Please correct me if I'm wrong.
I need append/rename file abc.txt with file processed date and time like abc_systemdatetimestamp.txt
and move it to different folder.
for example I have
/source/data/abc.txt
... (1 Reply)
Hi All,
I have incoming source files abcmmyy.txt I need to extract the mmyy part from the filename and pass that to a variable . I really appreciate your quick response on this.
Thanks
raj (7 Replies)
hi
i want to validate the date and time in filename
filename : mohan.moh.ccyymmdd.ccyymmdd.hhmmss.txt
mohan_moh.20151222.20151222.122442.txt
i want code that check that date given in filename 20151222 in this format ccyymmdd else it mark file is not valid used in my OS detail is AIX 6... (12 Replies)
Hi,
I am facing one scenario in which I need to extract exact position of date and time from the name of the files. For example, Below is the record in which I need to extract position of YYYYMMDD,HHMISS and YYMMDD. Date and time variables can come more than once. I need to use these position... (13 Replies)
Discussion started by: Prathmesh
13 Replies
LEARN ABOUT PHP
geoip_region_name_by_code
GEOIP_REGION_NAME_BY_CODE(3) 1 GEOIP_REGION_NAME_BY_CODE(3)geoip_region_name_by_code - Returns the region name for some country and region code comboSYNOPSIS
string geoip_region_name_by_code (string $country_code, string $region_code)
DESCRIPTION
The geoip_region_name_by_code(3) function will return the region name corresponding to a country and region code combo.
In the United States, the region code corresponds to the two-letter abbreviation of each state. In Canada, the region code corresponds to
the two-letter province or territory code as attributed by Canada Post.
For the rest of the world, GeoIP uses FIPS 10-4 codes to represent regions. You can check http://www.maxmind.com/app/fips10_4 for a
detailed list of FIPS 10-4 codes.
This function is always available if using GeoIP Library version 1.4.1 or newer. The data is taken directly from the GeoIP Library and not
from any database.
PARAMETERS
o $country_code
- The two-letter country code (see geoip_country_code_by_name(3))
o $region_code
- The two-letter (or digit) region code (see geoip_region_by_name(3))
RETURN VALUES
Returns the region name on success, or FALSE if the country and region code combo cannot be found.
EXAMPLES
Example #1
A geoip_region_name_by_code(3) example using region code for US/Canada
This will print the region name for country CA (Canada), region QC (Quebec).
<?php
$region = geoip_region_name_by_code('CA', 'QC');
if ($region) {
echo 'Region name for CA/QC is: ' . $region;
}
?>
The above example will output:
Region name for CA/QC is: Quebec
Example #2
A geoip_region_name_by_code(3) example using FIPS codes
This will print the region name for country JP (Japan), region 01.
<?php
$region = geoip_region_name_by_code('JP', '01');
if ($region) {
echo 'Region name for JP/01 is: ' . $region;
}
?>
The above example will output:
Region name for JP/01 is: Aichi
PHP Documentation Group GEOIP_REGION_NAME_BY_CODE(3)