02-07-2009
hi friends ..plz help me its soooooooooo urgent
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to sftp some files to a remote directory. Before transferring files i want to check whether the required folder exists. If so copy the files to that folder, else create the folder and copy the files.
Thanks in adv (1 Reply)
Discussion started by: borncrazy
1 Replies
2. Shell Programming and Scripting
Hi, I have cobbled together a simple script to create a Windows folder in a bunch of home folders on a mac server using the following code.
for i in /Volumes/student_data/studenthomefolders/*
do
u=`echo $i | cut -d/ -f5`
//if
//then
//echo "Folder already exists for "$u" Skipping"
//else... (4 Replies)
Discussion started by: psyman
4 Replies
3. Shell Programming and Scripting
hi,
I posted a thread before on that subject, but with a wrong focus...
here's my problem: I want to check if a file exists in a windows shared folder mounted using:
sudo mount -t cifs -o username=xxx,password=xxx,uid=xxx,gid=xxx //192.168.0.92/public /media/92_shared
I tried
if
... (2 Replies)
Discussion started by: jul
2 Replies
4. Shell Programming and Scripting
Hi All,
working on AIX 5.3.
Requirement is:
Shell script in ksh to check if any file exists in 4 folders as below:
1. /FILE/INB/INT1
2. /FILE/INB/INT2
3. /FILE/INB/INT3
4. /FILE/INB/INT4
Thanks a lot for your time!
a1_win. (3 Replies)
Discussion started by: a1_win
3 Replies
5. Shell Programming and Scripting
Hello!
I'm stuck with a problem that i can't solve. I'm very new to unix, linux and shell scripting i might add. I'm trying to create a script that will execute as follows:
First start the script - sh exist
Then the prompt asks the user to input a username to check if it exists within the... (6 Replies)
Discussion started by: bib2006
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Below is some code that I would like to implement however I am getting these errors: (what I am attempting to do is to check if a zip file has ascii files and if ascii and not binary then move the ascii files to a folder. some of the files are in xml format but are ascii and i will be moving... (0 Replies)
Discussion started by: bwcberb
0 Replies
7. Shell Programming and Scripting
Hi,
When trying to chk if a folder exists on remote server using the below command (got it from other thread in this forum)
"ifvchr@s1.mrix.local '/cygdrive/d/shares/projects\ data\ load/test\ files/$SCPED_FILES$name$code'`];
then
echo "Directory exists";
else
echo "Directory... (0 Replies)
Discussion started by: funonnet
0 Replies
8. Shell Programming and Scripting
Hi,
It will be great help if any of them can provide or tell which scripting is possible to write for checking folder exists or not in Windows server from Unix/Windows machine.
If folder doesn't exist then need to create the folder through script and copy the files.
It is on very... (1 Reply)
Discussion started by: prakashchakra7
1 Replies
9. Shell Programming and Scripting
Hi All,
I am a beginner in this and trying to write a shell script in linux which will :
1. Ask for a file name and check if its exists.
2. If file exists only then it will ask for the new target folder, after entering target folder name it will check if it exists.
3. If target folder... (3 Replies)
Discussion started by: ashish_neekhra
3 Replies
10. Shell Programming and Scripting
Hi Team,
I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder.
Eg:
parent folder --> /Interface/data/test/IN
Sub folder -->/Interface/data/test/IN/Invoice20180607233338
Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
LEARN ABOUT PHP
mysqli_stmt_result_metadata
MYSQLI_STMT_RESULT_METADATA(3) 1 MYSQLI_STMT_RESULT_METADATA(3)
mysqli_stmt::result_metadata - Returns result set metadata from a prepared statement
Object oriented style
SYNOPSIS
mysqli_result mysqli_stmt::result_metadata (void )
DESCRIPTION
Procedural style
mysqli_result mysqli_stmt_result_metadata (mysqli_stmt $stmt)
If a statement passed to mysqli_prepare(3) is one that produces a result set, mysqli_stmt_result_metadata(3) returns the result object
that can be used to process the meta information such as total number of fields and individual field information.
Note
This result set pointer can be passed as an argument to any of the field-based functions that process result set metadata, such as:
omysqli_num_fields(3)
omysqli_fetch_field(3)
omysqli_fetch_field_direct(3)
omysqli_fetch_fields(3)
omysqli_field_count(3)
omysqli_field_seek(3)
omysqli_field_tell(3)
omysqli_free_result(3)
The result set structure should be freed when you are done with it, which you can do by passing it to mysqli_free_result(3)
Note
The result set returned by mysqli_stmt_result_metadata(3) contains only metadata. It does not contain any row results. The rows are
obtained by using the statement handle with mysqli_stmt_fetch(3).
PARAMETERS
o $
stmt -Procedural style only: A statement identifier returned by mysqli_stmt_init(3).
RETURN VALUES
Returns a result object or FALSE if an error occurred.
EXAMPLES
Example #1
Object oriented style
<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "test");
$mysqli->query("DROP TABLE IF EXISTS friends");
$mysqli->query("CREATE TABLE friends (id int, name varchar(20))");
$mysqli->query("INSERT INTO friends VALUES (1,'Hartmut'), (2, 'Ulf')");
$stmt = $mysqli->prepare("SELECT id, name FROM friends");
$stmt->execute();
/* get resultset for metadata */
$result = $stmt->result_metadata();
/* retrieve field information from metadata result set */
$field = $result->fetch_field();
printf("Fieldname: %s
", $field->name);
/* close resultset */
$result->close();
/* close connection */
$mysqli->close();
?>
Example #2
Procedural style
<?php
$link = mysqli_connect("localhost", "my_user", "my_password", "test");
mysqli_query($link, "DROP TABLE IF EXISTS friends");
mysqli_query($link, "CREATE TABLE friends (id int, name varchar(20))");
mysqli_query($link, "INSERT INTO friends VALUES (1,'Hartmut'), (2, 'Ulf')");
$stmt = mysqli_prepare($link, "SELECT id, name FROM friends");
mysqli_stmt_execute($stmt);
/* get resultset for metadata */
$result = mysqli_stmt_result_metadata($stmt);
/* retrieve field information from metadata result set */
$field = mysqli_fetch_field($result);
printf("Fieldname: %s
", $field->name);
/* close resultset */
mysqli_free_result($result);
/* close connection */
mysqli_close($link);
?>
SEE ALSO
mysqli_prepare(3), mysqli_free_result(3).
PHP Documentation Group MYSQLI_STMT_RESULT_METADATA(3)