Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7858231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:19:41+00:00 2026-06-02T21:19:41+00:00

In regards to the question I previously posted, I have written the following script

  • 0

In regards to the question I previously posted, I have written the following script to load a specific file:

#!/bin/perl

use strict;
use Net::FTP;

my $ftpOb = Net::FTP->new("X")
         or die ("Could not connect to the FTP Server: $@");
print "Connected \n";

$ftpOb->login("A", "B")
         or die ("Incorrect server credentials");
print "Logged in \n";

print " Current folder is: " . $ftpOb->pwd();

$ftpOb->cwd("root/Folder") or die ("Cannot connect to the folder on Server");
print "Transferred to folder \n";


$ftpOb->get("621418185-006249189002-5383.txt")
         or die ("Error occured while fetching the file");

$ftpOb->quit;

However, the code seems to fail to change the working directory and I get the following output:

Connected
Logged in
Cannot connect to the folder on Server at ./GetUploadFile.pl line 16.
 Current folder is: /

Can anyone please help me debug the issue here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T21:19:48+00:00Added an answer on June 2, 2026 at 9:19 pm

    Include $ftpOb->message() in your error messages (except for the connect, where $@ is the correct error message).

    Also do a dir() and list what files/directories are available.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a general question with regards to immutable collections. I will use Java
This question regards my personal photography website. I use the following javascript to generate
Previously I have posted a question how to populate data from Dataset into excel
i have a question in regards to php calculations. i am restructuring a text
I had posted a question in regards to this code. I found that JTextArea
I have got a question with regards to upgrading asp.net mvc applications from v1
I have just asked this question an hour ago but with regards to IE8
With regards to a question I posted earlier on ( WPF: Correctly storing an
I previously asked a question with regards to parsing json, since then I found
My question regards how to design a database. I have one table, called posts,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.