troubleshooting Question


Avatar of cdrami
cdrami asked on
7 Comments1 Solution336 ViewsLast Modified:
i am doing a file search and ftp drop in this script below, i want to be able to look for a file with a string in it.  Not just a static file.  They will have dates in each filename so what imdoing wont work.
$filename = "D:/DATA/iwireless_kroger_rebate.txt";
$file = 'D:\DATA\iwireless_kroger_rebate.txt';
$remote_file = 'Integration\Rebates\iwireless_kroger_rebate.txt';
$ftp_server = "";
// set up basic connection
$conn_id = ftp_connect($ftp_server);

$ftp_user_name = "qualution";
$ftp_user_pass = "16Bl0ck$";
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) {
 echo "successfully uploaded $file\n";
} else {
 echo "There was a problem while uploading $file\n";

// close the connection

	echo "the file does not exist"; 
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros