Ошибка could not get file size of file s

I’m ftping the contents of a documents directory to my online file folder space from GoDaddy. I have the file overwrite settings set to overwrite on upload if file sizes are different.

The problem is that every single file size comparison for the transfer generates a could not get file size error (excerpt below). I used Filezilla to upload files initially and it did not throw any of these errors. (It couldn’t handle large files though and that’s why I’m testing out flashfxp)

Excerpt from transfer:

[R] 200 Switching to Binary mode.
[R] SIZE Tuloriad, The — John Ringo & Tom Kratman.mobi
[R] 550 Could not get file size.
[R] PASV
[R] 227 Entering Passive Mode (xxxx)
[R] Opening data connection IP: xxxxx 0 PORT: xxxxx
[R] STOR Tuloriad, The — John Ringo & Tom Kratman.mobi
[R] 150 Ok to send data.
[R] 226 File receive OK.
Transferred: Tuloriad, The — John Ringo & Tom Kratman.mobi 569 KB in 5.79 seconds (98.3 KB/s)
[R] MKD /Home/Ebooks/Ringo, John & Taylor, Travis S_
[R] 550 Create folder operation failed.
[R] CWD /Home/Ebooks/Ringo, John & Taylor, Travis S_
[R] 250 Directory successfully changed.
[R] PWD
[R] 257 «/Home/Ebooks/Ringo, John & Taylor, Travis S_/»
[R] TYPE A
[R] 200 Switching to ASCII mode.
[R] PASV
[R] 227 Entering Passive Mode (xxxx)
[R] Opening data connection IP: xxxx PORT: xxxx
[R] LIST -al
[R] 150 Here comes the directory listing.
[R] 226 Directory send OK.
[R] List Complete: 224 bytes in 0.58 seconds (0.4 KB/s)
[R] TYPE I
[R] 200 Switching to Binary mode.
[R] SIZE Claws That Catch — John Ringo & Travis S. Taylor.mobi
[R] 550 Could not get file size.
[R] PASV
[R] 227 Entering Passive Mode (xxxxxxxxxx)
[R] Opening data connection IP: xxxxxxxxxx PORT: xxxx

Old

09-05-2017, 01:49

Registered User

 

Join Date: Jul 2016

Location: Indonesia

Posts: 37

Thanks: 12

Thanked 17 Times in 5 Posts

Fakhruddinmaruf_ is on a distinguished road

Help! Precomp Error: Could not get file size of file %s


I have compiled new installer and test it but when decompressing file bin i got error that say «ERROR: Could not get file size of file %s». What should i do to fix this? Anyone can help me?

Error on Precomp


Last edited by Fakhruddinmaruf_; 09-05-2017 at 01:52.

Reply With Quote

Old

13-05-2017, 12:47

Jiva newstone's Avatar

Registered User

 

Join Date: Nov 2016

Location: India

Posts: 190

Thanks: 227

Thanked 401 Times in 96 Posts

Jiva newstone is on a distinguished road

it is the error due to wrong switches eg:= original switch:-c- my switch -cb- for precomp 4.2

Reply With Quote

I want to read a file which is on a remote ftp server to a variable. I tried reading with address

fopen("ftp://user:pass@localhost/filetoread");

and

$contents = file_get_contents('ftp://ftpuser:123456789@localhost/file.conf');
echo $contents;

Neither does work. I also tried to send directly GET request to the URL which also doesn’t work. How can I read the FTP file without downloading?

I checked the php warning which says:

PHP Warning: file_get_contents(ftp://…@localhost/file.conf): failed to open stream: FTP server reports 550 Could not get file size.
in /var/www/html/api/listfolder.php on line 2

I’m sure that the file exists

Martin Prikryl's user avatar

asked Apr 19, 2017 at 20:19

Metin Çetin's user avatar

0

The PHP FTP URL wrapper seems to require FTP SIZE command, what your FTP server does not support.

Use the ftp_fget instead:

$conn_id = ftp_connect('hostname');

ftp_login($conn_id, 'username', 'password');
ftp_pasv($conn_id, true);

$h = fopen('php://temp', 'r+');

ftp_fget($conn_id, $h, '/path/to/file', FTP_BINARY, 0);

$fstats = fstat($h);
fseek($h, 0);
$contents = fread($h, $fstats['size']); 

fclose($h);
ftp_close($conn_id);

(add error handling)

See PHP: How do I read a .txt file from FTP server into a variable?

answered Apr 21, 2017 at 10:49

Martin Prikryl's user avatar

Martin PrikrylMartin Prikryl

181k52 gold badges461 silver badges933 bronze badges

Based on @Martin Prikryl’s answer, here a revised one to work with any url format.

function getFtpUrlBinaryContents($url){
    $path_info = parse_url($url);
    $conn_id = ftp_connect($path_info['host'], $path_info['port'] ?? 21);
    if(isset($path_info['user'])){
        ftp_login($conn_id, $path_info['user'], $path_info['pass'] ?? '');
    }
    ftp_pasv($conn_id, true);

    $h = fopen('php://temp', 'r+');

    ftp_fget($conn_id, $h, $path_info['path'], FTP_BINARY, 0);
    $fstats = fstat($h);
    fseek($h, 0);
    $contents = fread($h, $fstats['size']);
    fclose($h);
    ftp_close($conn_id);
    return $contents;
}
$contents = getFtpUrlBinaryContents('ftp://ftpuser:123456789@localhost/file.conf');
echo $contents;

answered Jan 12, 2021 at 21:04

Jimmy Ilenloa's user avatar

i get the following error

FTP server reports 550 Could not get file size

when i run the following script

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_bluesky = "localhost";
$database_bluesky = "my_db";
$username_bluesky = "user";
$password_bluesky = "pass";
$bluesky = mysql_pconnect($hostname_bluesky, $username_bluesky, $password_bluesky) or trigger_error(mysql_error(),E_USER_ERROR); 

$n = 0;

mysql_select_db($database_bluesky,$bluesky);
$result = mysql_query("SELECT * FROM weather ORDER BY id ASC LIMIT 100");
while($row = mysql_fetch_assoc($result))
{

/* THis is for the short metars*/
$file = file("ftp://tgftp.nws.noaa.gov/data/observations/metar/stations/".$row['icao'].".TXT");

if($file)
mysql_query("UPDATE airports SET raw = '".$file[1]."' WHERE icao = '".$row['icao']."'", $bluesky);
else
mysql_query("UPDATE airports SET raw = '[Not Available]' WHERE icao = '".$row['icao']."'", $bluesky);

/* THis is for the long metars*/
$file = file("ftp://tgftp.nws.noaa.gov/data/observations/metar/decoded/".$row['icao'].".TXT");

if($file)
{
$decrypt = NULL;
foreach ($file as $v)
{
$decrypt .= $v."**";
}
mysql_query("UPDATE airports SET decoded = '".$decrypt."' WHERE icao = '".$row['icao']."'", $bluesky);
}
else
{
mysql_query("UPDATE airports SET decoded = '[Not Available]' WHERE icao = '".$row['icao']."'", $bluesky);
}
}
?>

<?php
/**
* ChronoCMS version 1.0
* Copyright (c) 2012 ChronoCMS.com, All rights reserved.
* Author: (ChronoCMS.com Team)
* license: Please read LICENSE.txt
* Visit http://www.ChronoCMS.com for regular updates and information.
**/
namespace GCoreAdminExtensionsChronoformsActionsFileUpload;
/* @copyright:ChronoEngine.com @license:GPLv2 */defined(‘_JEXEC’) or die(‘Restricted access’);
defined(«GCORE_SITE») or die;
Class FileUpload extends GCoreAdminExtensionsChronoformsAction{
   static $title = ‘Files Upload’;
   static $setup = array(‘simple’ => array(‘title’ => ‘Uploads’));
   var $events = array(‘success’ => 0, ‘fail’ => 0);

   var $defaults = array(
      ‘files’ => »,
      ‘array_fields’ => »,
      ‘upload_path’ => »,
      ‘forced_file_name’ => »,
      ‘max_size’ => ‘100’,
      ‘min_size’ => ‘0’,
      ‘enabled’ => 1,
      ‘safe_file_name’ => 1,
      ‘max_error’ => ‘Sorry, Your uploaded file size exceeds the allowed limit.’,
      ‘min_error’ => ‘Sorry, Your uploaded file size is less than the minimum limit.’,
      ‘type_error’ => ‘Sorry, Your uploaded file type is not allowed.’,
      ‘extensions_separator’ => ‘-‘,
   );

   function execute(&$form, $action_id){
      $config =  $form->actions_config[$action_id];
      $this->config = $config = new GCoreLibsParameter($config);
      if((bool)$config->get(‘enabled’, 0) === false){
         return;
      }
      $upload_path = $config->get(‘upload_path’, »);
      if(!empty($upload_path)){
         $upload_path = str_replace(array(«/», «»), DS, $upload_path);
         if(substr($upload_path, -1) == DS){
            $upload_path = substr_replace($upload_path, », -1);
         }
         $upload_path = $upload_path.DS;
         $config->set(‘upload_path’, $upload_path);
      }else{
         $upload_path = GCoreC::ext_path(‘chronoforms’, ‘front’).’uploads’.DS.$form->form[‘Form’][‘title’].DS;
      }
      $this->upload_path = $upload_path;
      //check path is correct
      if(!is_dir($this->upload_path) OR !is_writable(realpath($this->upload_path))){
         //$form->errors[] = «Unable to write to upload directory.»;
         //$this->events[‘fail’] = 1;
         //return;
      }
      if(!file_exists($this->upload_path.DS.’index.html’)){
         if(!GCoreLibsFolder::create($this->upload_path)){
            $form->errors[] = «Couldn’t create upload directory: «.$this->upload_path;
            $this->events[‘fail’] = 1;
            return;
         }
         $dummy_c = ‘<html><body bgcolor=»#ffffff»></body></html>’;
         if(!GCoreLibsFile::write($this->upload_path.DS.’index.html’, $dummy_c)){
            $form->errors[] = «Couldn’t create upload directory index file.»;
            $this->events[‘fail’] = 1;
            return;
         }
      }
      $files_array = explode(«n», trim($config->get(‘files’, »)));
      //get array fields
      $array_fields = array();
      if(trim($config->get(‘array_fields’, »))){
         $array_fields = explode(‘,’, trim($config->get(‘array_fields’, »)));
      }

      foreach($files_array as $file_string){
         if(strpos($file_string, ‘:’)!== false){
            $file_data = explode(‘:’, trim($file_string));
            $file_extensions = explode($config->get(‘extensions_separator’, ‘-‘), $file_data[1]);//ошибка!
            //convert all extensions to lower case
            foreach($file_extensions as $k => $file_extension){
               $file_extensions[$k] = strtolower($file_extension);
            }//ошибка!

            //get the posted file details
            $field_name = $file_data[0];
            if(empty($_FILES[$field_name])){
               continue;
            }
            $file_post = $_FILES[$field_name];
            if(in_array($field_name, $array_fields) AND !empty($file_post[‘name’]) AND ($file_post[‘name’] === array_values($file_post[‘name’]))){
               foreach($file_post[‘name’] as $k => $v){
                  $uploaded_file_data = $this->processUpload($form, array(‘name’ => $file_post[‘name’][$k], ‘tmp_name’ => $file_post[‘tmp_name’][$k], ‘error’ => $file_post[‘error’][$k], ‘size’ => $file_post[‘size’][$k]), $file_data[0], $file_extensions);
                  if(is_array($uploaded_file_data)){
                     $form->files[$field_name][] = $uploaded_file_data;
                     $form->data[$field_name][] = $uploaded_file_data[‘name’];
                  }elseif($uploaded_file_data === false){
                     return false;
                  }
               }
            }else{
               $uploaded_file_data = $this->processUpload($form, $file_post, $field_name, $file_extensions);
               if(is_array($uploaded_file_data)){
                  $form->files[$field_name] = $uploaded_file_data;
                  $form->data[$field_name] = $uploaded_file_data[‘name’];
               }elseif($uploaded_file_data === false){
                  return false;
               }
            }
         }
      }
   }

   function processUpload(&$form, $file_post = array(), $field_name, $file_extensions){
      //check valid file
      if(!GCoreLibsUpload::valid($file_post)){
         return false;
      }
      //check not empty file upload
      if(!GCoreLibsUpload::not_empty($file_post)){
         return false;
      }
      //check errors
      if(!isset($file_post[‘tmp_name’]) OR !is_uploaded_file($file_post[‘tmp_name’])){
         if(!empty($file_post[‘error’]) AND $file_post[‘error’] !== UPLOAD_ERR_OK){
            $form->debug[$action_id][self::$title][] = ‘PHP returned this error for file upload by : ‘.$field_name.’, PHP error is: ‘.$file_post[‘error’];
            $form->errors[$field_name] = $file_post[‘error’];
         }
         $this->events[‘fail’] = 1;
         return false;
      }else{
         $form->debug[$action_id][self::$title][] = ‘Upload routine started for file upload by : ‘.$field_name;
      }
      if((bool)$this->config->get(‘safe_file_name’, 1) === true){
         $file_name = GCoreLibsFile::makeSafe($file_post[‘name’]);
      }else{
         $file_name = utf8_decode($file_post[‘name’]);
      }
      $real_file_name = $file_name;
      $file_tmp_name = $file_post[‘tmp_name’];
      $file_info = pathinfo($file_name);
      //mask the file name
      if(strlen($this->config->get(‘forced_file_name’, »)) > 0){
         $file_name = str_replace(‘FILE_NAME’, $file_name, $this->config->get(‘forced_file_name’, »));
      }else{
         $file_name = date(‘YmdHis’).’_’.$file_name;
      }
      //check the file size
      if($file_tmp_name){
         //check max size
         if($file_post[‘error’] === UPLOAD_ERR_INI_SIZE){
            $form->debug[$action_id][self::$title][] = ‘File : ‘.$field_name.’ size is over the max PHP configured limit.’;
            $form->errors[$field_name] = $this->config->get(‘max_error’, ‘Sorry, Your uploaded file size (‘.($file_post[«size»] / 1024).’ KB) exceeds the allowed limit.’);
            $this->events[‘fail’] = 1;
            return false;
         }elseif(($file_post[«size»] / 1024) > (int)$this->config->get(‘max_size’, 100)){
            $form->debug[$action_id][self::$title][] = ‘File : ‘.$field_name.’ size is over the max limit.’;
            $form->errors[$field_name] = $this->config->get(‘max_error’, ‘Sorry, Your uploaded file size (‘.($file_post[«size»] / 1024).’ KB) exceeds the allowed limit.’);
            $this->events[‘fail’] = 1;
            return false;
         }elseif(($file_post[«size»] / 1024) < (int)$this->config->get(‘min_size’, 0)){
            $form->debug[$action_id][self::$title][] = ‘File : ‘.$field_name.’ size is less than the minimum limit.’;
            $form->errors[$field_name] = $this->config->get(‘min_error’, ‘Sorry, Your uploaded file size (‘.($file_post[«size»] / 1024).’ KB) is less than the minimum limit.’);
            $this->events[‘fail’] = 1;
            return false;
         }elseif(!in_array(strtolower($file_info[‘extension’]), $file_extensions)){
            $form->debug[$action_id][self::$title][] = ‘File : ‘.$field_name.’ extension is not allowed.’;
            $form->errors[$field_name] = $this->config->get(‘type_error’, ‘Sorry, Your uploaded file type is not allowed.’);
            $this->events[‘fail’] = 1;
            return false;
         }else{
            $uploaded_file = GCoreLibsUpload::save($file_tmp_name, $this->upload_path.$file_name);
            if($uploaded_file){
               $uploaded_file_data = array();
               $uploaded_file_data = array(‘name’ => $file_name, ‘original_name’ => $real_file_name, ‘path’ => $this->upload_path.$file_name, ‘size’ => $file_post[«size»]);
               //Try to generate an auto file link
               $site_link = GCoreC::get(‘GCORE_FRONT_URL’);
               if(substr($site_link, -1) == «/»){
                  $site_link = substr_replace($site_link, », -1);
               }
               $uploaded_file_data[‘link’] = str_replace(array(GCoreC::get(‘GCORE_FRONT_PATH’), DS), array($site_link, «/»), $this->upload_path.$file_name);
               //$form->data[$field_name] = $file_name;
               $form->debug[$action_id][self::$title][] = $this->upload_path.$file_name.’ has been uploaded successfully.’;
               $this->events[‘success’] = 1;
               return $uploaded_file_data;
            }else{
               $form->debug[$action_id][self::$title][] = $this->upload_path.$file_name.’ could not be uploaded!!’;
               $this->events[‘fail’] = 1;
               return false;
            }
         }
      }
   }

   public static function config(){
      echo GCoreHelpersHtml::formStart(‘action_config file_upload_action_config’, ‘file_upload_action_config_{N}’);
      echo GCoreHelpersHtml::formSecStart();
      echo GCoreHelpersHtml::formLine(‘Form[extras][actions_config][{N}][enabled]’, array(‘type’ => ‘dropdown’, ‘label’ => l_(‘CF_ENABLED’), ‘options’ => array(0 => l_(‘NO’), 1 => l_(‘YES’))));
      echo GCoreHelpersHtml::formLine(‘Form[extras][actions_config][{N}][files]’, array(‘type’ => ‘textarea’, ‘label’ => l_(‘CF_FILES_CONFIG’), ‘rows’ => 5, ‘cols’ => 60, ‘sublabel’ => l_(‘CF_FILES_CONFIG_DESC’)));
      echo GCoreHelpersHtml::formLine(‘Form[extras][actions_config][{N}][upload_path]’, array(‘type’ => ‘text’, ‘label’ => l_(‘CF_UPLOAD_PATH’), ‘class’ => ‘XL’, ‘sublabel’ => l_(‘CF_UPLOAD_PATH_DESC’)));
      echo GCoreHelpersHtml::formLine(‘Form[extras][actions_config][{N}][max_size]’, array(‘type’ => ‘text’, ‘label’ => l_(‘CF_MAX_FILE_SIZE’), ‘sublabel’ => l_(‘CF_MAX_FILE_SIZE_DESC’)));
      echo GCoreHelpersHtml::formLine(‘Form[extras][actions_config][{N}][min_size]’, array(‘type’ => ‘text’, ‘label’ => l_(‘CF_MIN_FILE_SIZE’), ‘sublabel’ => l_(‘CF_MIN_FILE_SIZE_DESC’)));
      echo GCoreHelpersHtml::formLine(‘Form[extras][actions_config][{N}][max_error]’, array(‘type’ => ‘text’, ‘label’ => l_(‘CF_MAX_SIZE_ERROR’), ‘class’ => ‘XL’, ‘sublabel’ => l_(‘CF_MAX_SIZE_ERROR_DESC’)));
      echo GCoreHelpersHtml::formLine(‘Form[extras][actions_config][{N}][min_error]’, array(‘type’ => ‘text’, ‘label’ => l_(‘CF_MIN_SIZE_ERROR’), ‘class’ => ‘XL’, ‘sublabel’ => l_(‘CF_MIN_SIZE_ERROR_DESC’)));
      echo GCoreHelpersHtml::formLine(‘Form[extras][actions_config][{N}][type_error]’, array(‘type’ => ‘text’, ‘label’ => l_(‘CF_FILE_TYPE_ERROR’), ‘class’ => ‘XL’, ‘sublabel’ => l_(‘CF_FILE_TYPE_ERROR_DESC’)));
      echo GCoreHelpersHtml::formLine(‘Form[extras][actions_config][{N}][extensions_separator]’, array(‘type’ => ‘text’, ‘label’ => l_(‘CF_FILE_UPLOAD_EXT_SEPARATOR’), ‘class’ => ‘S’, ‘sublabel’ => l_(‘CF_FILE_UPLOAD_EXT_SEPARATOR_DESC’)));
      echo GCoreHelpersHtml::formSecEnd();
      echo GCoreHelpersHtml::formEnd();
   }

@miguelpruivo here is my complete code, and its working pretty fine with Android devices

import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:path/path.dart';
import 'package:toast/toast.dart';
import 'package:uuid/uuid.dart';
import 'dart:io';

import '../../../db/models/form_media_table.dart';
import '../../../models/app_meta_data_config.dart';
import '../../../ua_app_context.dart';
import '../../../ui/helpers/form_values.dart';
import '../../../ui/themes/color_theme.dart';
import '../../../ui/themes/text_theme.dart';
import '../../../ui/themes/uniapp_css.dart';
import '../../../ui/widgets/formelements/form_transaction_info.dart';
import '../../../utils/common_constants.dart';
import '../../../utils/media_action_type.dart';
import '../../../utils/media_subtype.dart';
import '../../../utils/media_type.dart';
import '../../../utils/media_upload_status.dart';
import '../../../utils/string_utils.dart';

class FormFileUpload extends StatefulWidget {
  final String id;
  final String title;
  final String datatype;
  final String appId;
  final String projectId;
  final String externalProjectId;
  final String uiType;
  final bool showInfo;
  final bool isBorderRequired;

  FormFileUpload({
    this.id,
    this.title,
    this.datatype,
    this.appId,
    this.projectId,
    this.externalProjectId,
    this.uiType,
    this.showInfo,
    this.isBorderRequired,
  });

  @override
  _FileUploadScreenState createState() {
    return _FileUploadScreenState();
  }
}

class _FileUploadScreenState extends State<FormFileUpload> {
  bool _isBorderRequired;
  BuildContext context;
  IconData iconData = Icons.file_upload;

  @override
  void initState() {
    super.initState();
    _isBorderRequired = widget.isBorderRequired;
  }

  @override
  Widget build(BuildContext context) {
    this.context = context;
    if (_isBorderRequired == null) {
      _isBorderRequired = true;
    }
    return Padding(
      padding: _isBorderRequired
          ? UniappCSS.smallHorizontalPadding
          : UniappCSS.largeHorizontalPadding,
      child: Container(
        decoration: BoxDecoration(
          borderRadius: UniappCSS.widgetBorderRadius,
          border: UniappCSS.widgetBorder,
          color: UniappColorTheme.fillColor,
        ),
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            Row(
              mainAxisSize: MainAxisSize.max,
              children: <Widget>[
                Expanded(
                  child: Container(
                    padding: UniappCSS.smallHorizontalAndVerticalPadding,
                    child: Text(
                      StringUtils.getTranslatedString(widget.title),
                      style: UniappTextTheme.defaultWidgetStyle,
                    ),
                  ),
                ),
                IconButton(
                  icon: Icon(iconData),
                  iconSize: UniappCSS.largeIconSize,
                  tooltip: "File Upload",
                  color: UniappColorTheme.widgetColor,
                  onPressed: () => onFileUploadIconClick(widget.datatype),
                ),
                TransactionInfoWidget(
                  formFieldKey: widget.id,
                  showInfo: widget.showInfo,
                  formFieldUiType: widget.uiType,
                ),
                SizedBox(
                  width: 8.0,
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }

  void onFileUploadIconClick(String datatype) async {
    // File Upload Clicked
    String filePath;
    /** Can upload image, video, audio, pdf and any other file format in the
     * default file finder **/
    switch (datatype) {
      case "image":
        filePath = await FilePicker.getFilePath(
          type: FileType.image,
        );
        break;
      case "video":
        filePath = await FilePicker.getFilePath(
          type: FileType.video,
          allowedExtensions: ['mp4'],
        );
        break;
      case "audio":
        filePath = await FilePicker.getFilePath(
          type: FileType.audio,
          allowedExtensions: ['mp3'],
        );
        break;
      case "pdf":
        filePath = await FilePicker.getFilePath(
          type: FileType.custom,
          allowedExtensions: ['pdf'],
        );
        break;
      default:
        filePath = await FilePicker.getFilePath(
          type: FileType.any,
        );
    }

    if (filePath != null && filePath.isNotEmpty) {
      // Valid file path returned
      // Get file name from the path
      File file = new File(filePath);
      String filename = basename(file.path);
//      print("XXXXXXXXXXXXXXXXXXXXXXXXXXX -- File name --" + filename);

      // Generate UUID, use as new filename
      String newFileName = new Uuid().v1();
//      print("XXXXXXXXXXXXXXXXXXXXXXXXXXX -- New Name -- $newFileName");

      // Add value to user entered fields map for the form
      formMap.addKeyToFormFieldSubmissionValue(widget.id, CommonConstants.SUBMISSION_OBJECT_VAL, newFileName);

      // Save entry to DB for media sync
      _addFileEntryToMediaTable(filename, newFileName, filePath, "pdf");
      if (formMap.cameraUuids != null) {
        formMap.cameraUuids.add(newFileName.toString());
      } else {
        formMap.cameraUuids = List();
        formMap.cameraUuids.add(newFileName.toString());
      }
      // Set state to refresh icon
      setState(() {
        iconData = Icons.check;
      });
    } else {
      // TODO : Log error
      Toast.show(CommonConstants.NO_FILE_FOUND, context);
    }
  }

  _addFileEntryToMediaTable(String fileName, String newFileName,
      String filePath, String fileExtension) async {
    AppMetaDataConfig appMetaConfig = UAAppContext.getInstance().appMDConfig;
    int retries = CommonConstants.MEDIA_IMAGE_DEFAULT_RETRIES;

    if (appMetaConfig != null &&
        appMetaConfig.mediaretries != null &&
        appMetaConfig.mediaretries != 0) {
      retries = appMetaConfig.mediaretries;
    }

    // Adding filename and externalProjectId to additional properties map
    Map<String, String> additionalProperties = new Map();
    additionalProperties[CommonConstants.EXTERNAL_PROJECT_ID] =
        widget.externalProjectId;
    additionalProperties["fileName"] = fileName;

    FormMediaTable formMedia = new FormMediaTable(
      widget.appId,
      UAAppContext.getInstance().userID,
      newFileName,
      0,
      widget.projectId,
      filePath,
      null,
      false,
      CommonConstants.DEFAULT_LATITUDE,
      CommonConstants.DEFAULT_LONGITUDE,
      CommonConstants.DEFAULT_ACCURACY,
      CommonConstants.DEFAULT_BEARING,
      MediaTypeHelper.getValue(MediaType.PDF),
      MediaSubTypeHelper.getValue(MediaSubType.FULL),
      fileExtension,
      0,
      0,
      MediaActionTypeHelper.getValue(MediaActionType.UPLOAD),
      retries,
      MediaUploadStatusHelper.getValue(MediaUploadStatus.NEW),
      additionalProperties,
    );

    await UAAppContext.getInstance()
        .unifiedAppDBHelper
        .insertFormMedia(formMedia);
  }
}

инструкции

 

To Fix (Download file size error) error you need to
follow the steps below:

Шаг 1:

 
Download
(Download file size error) Repair Tool
   

Шаг 2:

 
Нажмите «Scan» кнопка
   

Шаг 3:

 
Нажмите ‘Исправь все‘ и вы сделали!
 

Совместимость:
Windows 10, 8.1, 8, 7, Vista, XP
Загрузить размер: 6MB
Требования: Процессор 300 МГц, 256 MB Ram, 22 MB HDD

Limitations:
This download is a free evaluation version. Full repairs starting at $19.95.

Download file size error обычно вызвано неверно настроенными системными настройками или нерегулярными записями в реестре Windows. Эта ошибка может быть исправлена ​​специальным программным обеспечением, которое восстанавливает реестр и настраивает системные настройки для восстановления стабильности

If you have Download file size error then we strongly recommend that you

Download (Download file size error) Repair Tool.

This article contains information that shows you how to fix
Download file size error
both
(manually) and (automatically) , In addition, this article will help you troubleshoot some common error messages related to Download file size error that you may receive.

Примечание:
Эта статья была обновлено на 2023-02-03 и ранее опубликованный под WIKI_Q210794

Содержание

  •   1. Meaning of Download file size error?
  •   2. Causes of Download file size error?
  •   3. More info on Download file size error

Meaning of Download file size error?

Ошибка или неточность, вызванная ошибкой, совершая просчеты о том, что вы делаете. Это состояние неправильного суждения или концепции в вашем поведении, которое позволяет совершать катастрофические события. В машинах ошибка — это способ измерения разницы между наблюдаемым значением или вычисленным значением события против его реального значения.

Это отклонение от правильности и точности. Когда возникают ошибки, машины терпят крах, компьютеры замораживаются и программное обеспечение перестает работать. Ошибки — это в основном непреднамеренные события. В большинстве случаев ошибки являются результатом плохого управления и подготовки.

Ошибки, связанные с диском, часто являются основной причиной ошибок файловой системы в операционной системе Windows. Это в основном можно объяснить такими проблемами, как плохие сектора, коррупция в целостности диска или другие связанные с этим проблемы. С огромной программной системой, такой как Microsoft Windows, которая предназначена для выполнения чрезвычайно большого числа задач, в какой-то момент следует ожидать ошибок, связанных с файловой системой.

Некоторые из этих ошибок также могут быть вызваны сторонними программами, особенно теми, которые зависят от ядра Windows для запуска. Обычные пользователи могут также запускать такие ошибки файлов при интенсивном использовании.

Causes of Download file size error?

Большинство этих ошибок файлов можно легко устранить, применив последние обновления программного обеспечения от Microsoft. Однако иногда некоторые типы ошибок могут быть тяжелыми для ремонта.

Для более сложных проблем с файловой системой общие решения включают следующее:

  • Сброс окон
  • Выполнение ремонта системных файлов
  • Очистка кэша хранилища Windows
  • Ремонт компонентов
  • Переустановка приложений Windows

Вы также можете использовать утилиту Средство проверки системных файлов инструмент для исправления поврежденных и отсутствующих системных файлов. В то же время, Проверить диск chkdsk также можно использовать для проверки целостности файловой системы и определения местоположения поврежденных секторов на жестком диске.

More info on
Download file size error

РЕКОМЕНДУЕМЫЕ: Нажмите здесь, чтобы исправить ошибки Windows и оптимизировать производительность системы.

I am trying to download the Windows Vista 5384 Beta use. The x86 version downloads through both IE and FireFox. The x64 version I link, it only shows up as 13.7mb. I have tried reconnecting to the net, clearing cookies and temp files, even tried downloading it on my laptop.

Both computers on my network wont show the file size properly for what the problem could be? Anyone got any ideas the x64 file, yet both computers work fine when downloading the x86 file. I am having am having trouble with. Can you ‘report working for the site.

I have tried downloading fine, 3.5gb without a problem. When ever I click the direct download 2 x64 ISO file from the official MS public download site. No is just a broken link. I have tried 4 download tools, including the one recommended do!

If so, by MS on the site, and it still shows as 13.7mb. Try contacting someone link as broken’? I am sure that a very anoying problem.
How can I restict download file size in win xp?

But it doesn’t stop someone from downloading a huge file that has had the extension changed from, for example, zip to jpeg. Thx

You may want guarentees though.

-blitze

I have an internet cafe and here tweak that will solve my problem? I have used net limiter to control the speed, folder guard to restict in South Africa we have a cap.

Is there any software or certain extensions, zip, exe etc, so people can still view pictures, pdf’s, docs etc. By that I mean we are only for the answer without success. Http://www.kellys-korner-xp.com/xp_tweaks.htm

no allowed 3 gigs of data transfer per month.

I have searched the net to try kellis corner…

Sad I know but the telephone company still has the monopoly.


file size expected on download


AVG Бесплатно скачать вопрос — Размер файла


Vista Скачать Размер файла Проблема

Поэтому я посмотрел на Torrentspy размером с RC1 там, и все они были вокруг диапазона размеров 2.5Gb.

ЧТО ПРОИСХОДИТ.


IE9 PLEASE remove restriction on 4GB max file size download

Попробуйте
Although you can always download linux distros via a bittorrent client.

How Do I Download Large Files With Internet Explorer? | eHow.com
IE 9 RC currently available too.

Привет всем
PLEASE MS can you remove the restriction in IE that I’m on W7 X-64

ура
Джимбо

I believe theres no download solution for IE7.

— the ISO is around 4.7GB — IE says file too large for download. BTW this occurs in the allows a max file size of around 4GB to be downloaded. I often download various Linux DVD distros — currently testing SUSE LINUX 11.3 limit in IE8, though there was a 4gb limit in IE7.


Может загружаться нормально, но загружать любые остановки файлов до их завершения

Они быстро могут сказать, что 2348 kb все еще имеют те же проблемы, любая помощь будет отличной.

I uninstalled my AVG 2011 Virus Software but am from sky to talk talk I can’t upload any pictures to ebay.

Здравствуйте

Моя первоначальная проблема возникла, поскольку я изменил широкополосный провайдер 2548kb, а затем просто остановился, и загрузка завершилась неудачно.


ограничение загрузки файла по электронной почте

Animethod для некоторых, как segmet загрузки в более чем LAN сеть в университете. Где размер ограничения размера файла — 80 mb. Прочитали ли вы размер ограничения размера файла. Особенно в отношении запроса или предоставления помощи, чтобы обойти действующие правила?

  Любой путь к переходу, а не метод туннелирования, например, от свободы.

Буду благодарен за вашу помощь !!!

  Получите и оплатите свой собственный доступ в Интернет. Я хочу, чтобы метод для прямой загрузки правил форума еще? И я хочу загрузить файлы с сегментами меньшего размера, поэтому основные ограничения обойдутся.

ребята, я хочу получить помощь, пропуская ограничения по размеру файлов по интернету, доступные по размеру по 100mb forexample от rapidshare.


When a picture comes through I get a message to Get Media Download and File Size, why?

Although I have Unlimited Text and me what’s up … Then reverts back -Dave ! It states it is show up anywhere ? Yet the attachments never in my experience, MMS requires data.

Thanks MMS when I tap on the message. Can you tell to Get Download. Make sure cellular data is on, Getting Media Download …


determine file size of files in download in google chrome

Is there any option in the browser to size of downloading files in my Google Chrome. If you’re downloading files from websites, they usually give the filesize on the page before you click the link.

The filesize is shown in a box at the bottom bottom-left box and select ‘Show in folder’ to see the file’s details including size.

I very often don’t see the total file left of the Chrome screen while the file is downloading.

After the download is complete, only the filename is shown, so right-click the see the total file sizes of files being downloaded?


Can’t access �Download OTLPE.iso and burn to a CD using ISO Burner. NOTE: This file is 292Mb in size so it may take some ti…

I searched google but come up empty handed.Thank you for your help!Jan

Попробуйте это, пожалуйста.


Strange File Size Error

The file is about 7gb in size, and I know that the destination drive has 25gb free.

I’ve got a on here? But every time I try to copy it, I get an file from one computer to another. I’ve been trying to copy a error message telling me that there’s not enough free disk space.

Does anybody have any small home network. What’s going idea?
 


Ошибка определения размера файла?

Может быть указан номер телефона, на котором есть файлы Readme.txt на компакт-диске. Кто-нибудь знает, как это исправить?

  Is this program from a CD or a download? If it is off a CD, see if but I’m getting the message «Error determining size of file…».

Я пытаюсь установить новую программу, удалив ее и попробую загрузить ее снова.

Если это загрузка, я бы установил справку или даже веб-адрес.
 


Win 10/ File Size/ Read-Error?

You know what 171 luck

I have an old version folder over in Program Files (x86), and it’s 169MB….megabytes….not even one Gigabyte. I had originally done the in-place upgrade thinking it was a fluke and would correct itself after a reboot. Do not uninstall that.

I even went to the Control Panel/ Programs & Features and I’ve rebooted by computer since discovering this «size» discrepancy-read the other day, to Windows 10 from my previous Windows 8.1. I don’t think I’ve seen this on previous versions of would uninstall Calibre and try Version: 2.39.0. Why are you Creation Tool and put it on a USB drive.

The only one that is accurate in that picture is the one that does 2.26.0 and shows 390 megs. Windows 10 has What’s checked there to see if it was reporting the same; yup. Maybe ideas?

pointing at its supposed size? 89.5GB??

Hi Nope. And, I didn’t just install Windows 10 «over top of» my previous Windows 8.1; Any as well.

I mean, that first pic shows that the e-book program of Calibre; that would give me back over 89GB. Good Luck
Good Windows; this might be a unique glitch to Windows 10? None of those + 89 is? 260GB. Do you see using GiPo MoveOnBoot?

Here’s a partial screen-capture pic:
http://

And ya know, especially that GiPo can use it to organize, convert, and read e-books. use ESET. Definition Audio? Adobe Acrobat all.

Let’s say — according to what’s being re…


Ошибка размера файла — файлы DVD VOB, скопированные на DVD

как 1.99GB — ограничение файлов XP. Попросите друга отправить вам диск, пытаясь воспроизвести файл AVI (или другой формат, в котором он был разорван). Это в значительной степени варианты, которые у вас есть, если вам нужна информация.

Way back in 2005 I had decoded files from a couple of DVD’s via

I do not know how you copied that file, but it seems as if something was a bit off when you did. My DVD player also did you ripped from your friend. OR, go buy the DVD not play the whole DVD. And even those won’t work at all due to being incomplete.

Apple скопировала файл так, чтобы вы могли его снова разорвать, правильно. Http://www.ntfs.com/ntfs_vs_fat.htm

Decoded, DVD Windows XP, the DVD played just over 40 minutes and stopped. When I got back home and played the file on my an Apple Laptop (That’s what my friend had), while on a visit to Japan. It sounds a lot like you ripped a DVD movie from your friend and 1 single 4GB+ file.

More, correct, played, 1.99GB file size. Windows only recognised the file size don’t have the original 4GB file from the Apple machine.

  I don’t know how you can get only half of a single copied file, as I have never encountered it other than potential downloads from the Internet.


Ошибка размера файла Excel после встраивания фотографий

of course my server won’t allow me to send. I have double checked incoming files for size and be appreciated.

  Что может увеличить файл 6mg до 160 мг, а те же самые меньшие файлы при сохранении на моем excel увеличиваются.

По какой-то причине, когда я сохраняю файл, он резко увеличивается. Любая помощь может вызвать это?


Новый компьютер устанавливает ограничение на размер файла общего доступа 0x80070035

Все это имеет смысл и как отключить, и это сработало для передачи файлов 12-14 примерно по 2-3GB. Сеть реконфигурирует, но трудно сказать, какие настройки будут иметь эффект. Новый компьютер — это блокировка после 7 GB. Иногда изменение расширенных настроек драйвера может помочь двум старым компьютерам работать нормально в сети.

Вы должны сначала попробовать перейти на обновления Windows до пределов, установленных Windows, и убедиться, что они снова не активируются? У меня появился новый компьютер, и у меня проблемы. Новый компьютер — это блокировка после 7 GB. В первый раз я попытался передать что-либо после подключения после перезагрузки.

И он, предположительно, подключен к моей проводной домашней сети. Это позволит мне передавать файлы до 7.17 GB, а затем LindaPradetto

Новый участник, я надеюсь, что опубликую это правильно. есть ли встроенные лимиты? Спасибо,
Линда

Ultimate Windows 7 x64

Есть ли ограничения на скачивание с ограниченными ограничениями?

И он, предположительно, подключен к моей проводной домашней сети. В первый раз, когда я попытался передать что-либо после подключения, вы отключитесь от сети и сообщите мне следующую ошибку: 0x80070035. Есть три компьютера, которые подключены, и получите последние версии драйверов для вашей системы.

Я понимаю, что окна имеют встроенные ограничения?

Это позволит мне передавать файлы до 7.17 GB, а затем отключается от сети и дает мне следующую ошибку: 0x80070035. Я пытался обойтись …


Error: Size of ROM file is incorrect while BIOS update on Sattelite A200

Например, здесь:

http://forums.computers.toshiba-europe.com/forums/thread.jspa?messageID=112057&#112057

It seems it?s not a serious problem? the users have posted a solution. Can someone help i start updating it says » The size of ROM file is incorrect». Hi Stavros

I What shall this error message.

I remember i do? Bye

я с этим?

Уважаемые Дамы и Господа,

I was trying to update my bios on Sattelite A200 and then error appears because the BIOS file was not extracted correctly. Some of the forum think I can help you.


Asrock 775I65G Проблема с обновлением Bios Ошибка: размер файла Rom Неправильно

диск на этом ПК? У вас есть дискета в любом случае, удалите этот файл ROM и загрузите его снова. Если вы все еще хотите использовать средство обновления Windows, то они работают * большинство * времени, но не намного превосходят версии DOS.

Возможно, у вас была плохая загрузка.


Неправильное сообщение об ошибке размера файла во время обновления BIOS на Satellite M100

Hi

Сегодня ваш счастливый чувак. Это оригинальный документ;

http://support.toshiba-tro.de/kb0/TSB59014X0000R01.htm

Пожалуйста, попробуйте, и я это сделаю?

При попытке установить обновление BIOS мне повезло

Кажется, я нашел решение: D

Pelase заглянуть в эту тему форума:

http://forums.computers.toshiba-europe.com/forums/thread.jspa?threadID=19974&messageID=73284

Пользователь отправляет сообщение, если это ключ или нет.

Хорошо, спасибо. Что может получить сообщение об ошибке: размер файла ROM неправильный. JayJay предоставил ссылку на документ Toshiba, который помогает устранить эту проблему.


Недопустимый размер или контрольная сумма файла или неподдерживаемый формат сжатия — Исходная ошибка: 00008

Ошибка обработки файла, возможно, диск заполнен (ABORT / RETRY / IGNORE)

Полная ошибка: недопустимый размер или контрольная сумма файла или неподдерживаемый формат сжатия. Исходная ошибка: 00008.


«Can’t get attributes of file»

  • Reply to topic
  • Log in

Advertisement

Guest

2006-12-13 19:05

I am brand new to WinSCP. I’ve looked at the FAQ and troubleshooting guide and don’t find the answer to this problem.

When I am trying to transfer a binary file I receive the error

Can’t get attributes of file (filename).

The additional information from the More button is

Invalid argument to date encode.

Do you know what is causing the error message and how I resolve this?

Thanks!

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,466
Location:
Prague, Czechia

2006-12-13

I guess you are uploading files, are you? Where from? What version of WinSCP are you using? Have you tried the latest one?

Reply with quote

Guest

2006-12-13 21:58

Thanks for your reply. Yes, I am uploading files from a local drive. The WinSCP version is 3.7.6 (build 306). I can try downloading the latest version for this limited use. I normally just ftp to the other unix servers. This is a temporary server which the Unix admin recommended using WinSCP instead of ftp. I’ll try the new version and if that is unsuccessful I’ll contact the server admin.

Thanks!

Reply with quote

Guest2

Guest

2008-05-05 18:49

I have got the same error. I solved it removing archive check in the file properties. Yan

Reply with quote

Guest3

Guest

2008-08-06 15:12

@Guest2: Just exactly how did you do this? I’m having the same problem. Where is archive check located?

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar

2008-08-07

@Guest3: I guess @Guest2 meant the Properties box in Windows Explorer.

Reply with quote

bitjunky

Guest

2012-10-23 19:17

Just recently had this problem when our provider moved to ftp.drivehq.com

Not sure why but if I use a wildcard (*) in the filename it worked!

Example:

or

Reply with quote

martin◆

Site Admin

martin avatar

2012-10-25

@bitjunky: What version of WinSCP are you using?

Reply with quote

jreopelle
Joined:
2014-06-27
Posts:
1
Location:
Green Bay, WI

2014-06-27 19:49

@martin: I am running 5.5.4 and I am seeing the same thing with ftp.drivehq.com. Will there be a fix for this situation?

  • sftp.log (51.35 KB)

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,466
Location:
Prague, Czechia

2014-07-13

@jreopelle: Thanks for your report. I was able to reproduce the problem against ftp.hrivehq.com server.

I believe it’s a bug on their side. I have submitted a report on their support forum:

«Bad sequence of commands» error in reponse to MLST command. DriveHQ Cloud IT Service Support Forum

Meanwhile you can workaround the bug by configuring WinSCP to avoid MLST command.

For that you have to upgrade to WinSCP 5.6 beta and set Use MLSD command for directory listing to Off.

https://winscp.net/eng/docs/ui_login_ftp

(The option affects also MLST command, but only since 5.6 beta:

Bug 1181 – Make «Use MLSD command for directory listing» affect also use of MLST command)

Reply with quote

ftp.DriveHQ.com

Guest

2014-07-14 23:24

Thank you for reporting the problem to DriveHQ. It seems our engineers mixed MLST and MLSD, and required a data connection for MLST… The bug has been fixed.

Reply with quote

martin◆

Site Admin

martin avatar

2014-07-15

@ftp.DriveHQ.com: Thanks for your feedback!

Reply with quote

ziotibia81
Joined:
2015-03-23
Posts:
2

2015-03-23 15:32

Hello,

I revive this old post.

I’m using WinSCP scripting to download a file from a local instance of ownCloud.

The protocol is WebDAV. I have the same problem described here… In my case:

Can’t get attributes of file (filename)

successfully download.

WinSCP is version 5.7.1525

ownCloud version 8.0.2

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,466
Location:
Prague, Czechia

2015-03-25

@ziotibia81: Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

ziotibia81
Joined:
2015-03-23
Posts:
2

2015-03-25 11:33

added private attachment

  • log-success.txt (22.19 KB, Private file)

Description: Log of regular download

  • log-fail.txt (17.65 KB, Private file)

Description: Log of failed download

Reply with quote

Guest4

Guest

2015-03-25 18:20

I have got the same error, but I can’t find workaround.

If I put * in file name I’ve got

Error listing directory ‘/MyDirName’.

500 Internal Server Error

A)bort, (R)etry, (S)kip: Abort

If I put exact file name I’ve got

Can’t get attributes of file ‘MyFileName.zip’.

500 Internal Server Error

I use WebDAV protocol. WinSCP Version 5.7 (Build 5125)

Could you please help on it?

Thank you in advance!

Reply with quote

Alexander.Moiseev

Guest

2015-03-26 10:27

I’ve got the same error with WinSCP Version 5.7.1 (Build 5235)

I used script and .NET assembly.

And I used proxy for HTTP.

Reply with quote

Advertisement

Alexander.Moiseev

Guest

2015-03-27 08:23

Dear Martin,

Are there any good news regarding this issue?

Thank you in advance!

Reply with quote

martin◆

Site Admin

martin avatar

2015-03-30

Reply with quote

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,466
Location:
Prague, Czechia

2015-03-30

@Guest4: Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

TPMTL

Guest

2015-08-26 20:45

Hello,

We have the same issue.

On the same FTP server, one file works, another one gives the following error:

Can’t get attributes of file ‘budget_out.txt’.

Could not retrieve file information

Could not get file size.

Any help would be appreciated.

Thank you!

 2015-08-26 15:39:24.054 --------------------------------------------------------------------------
. 2015-08-26 15:39:24.054 WinSCP Version 5.7.5 (Build 5665) (OS 6.3.9600 - Windows Server 2012 R2 Datacenter)
. 2015-08-26 15:39:24.054 Configuration: HKCUSoftwareMartin PrikrylWinSCP 2
. 2015-08-26 15:39:24.054 Log level: Normal
. 2015-08-26 15:39:24.054 Local account: ***********************
. 2015-08-26 15:39:24.054 Working directory: C:DonneesRSS
. 2015-08-26 15:39:24.054 Process ID: 4872
. 2015-08-26 15:39:24.054 Command-line: "c:winscpWinSCP.exe" /console=575 /consoleinstance=_1912_411 "/command" "open ftp://**********************/" "get budget_out.txt" "exit" "/log=C:ftpscp.log" 
. 2015-08-26 15:39:24.054 Time zone: Current: GMT-4, Standard: GMT-5 (Eastern Standard Time), DST: GMT-4 (Eastern Daylight Time), DST Start: 3/8/2015, DST End: 11/1/2015
. 2015-08-26 15:39:24.054 Login time: Wednesday, August 26, 2015 3:39:24 PM
. 2015-08-26 15:39:24.054 --------------------------------------------------------------------------
. 2015-08-26 15:39:24.054 Script: Retrospectively logging previous script records:
> 2015-08-26 15:39:24.054 Script: open ftp://*******************/
. 2015-08-26 15:39:24.054 --------------------------------------------------------------------------
. 2015-08-26 15:39:24.054 Session name: ***************(Ad-Hoc site)
. 2015-08-26 15:39:24.054 Host name: **************** (Port: 21)
. 2015-08-26 15:39:24.054 User name: ****** (Password: Yes, Key file: No)
. 2015-08-26 15:39:24.054 Transfer Protocol: FTP
. 2015-08-26 15:39:24.054 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2015-08-26 15:39:24.054 Disable Nagle: No
. 2015-08-26 15:39:24.054 Proxy: none
. 2015-08-26 15:39:24.054 Send buffer: 262144
. 2015-08-26 15:39:24.054 UTF: 2
. 2015-08-26 15:39:24.054 FTP: FTPS: None; Passive: Yes [Force IP: A]; MLSD: A [List all: A]
. 2015-08-26 15:39:24.054 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-08-26 15:39:24.054 Cache directory changes: Yes, Permanent: Yes
. 2015-08-26 15:39:24.054 Timezone offset: 0h 0m
. 2015-08-26 15:39:24.054 --------------------------------------------------------------------------
. 2015-08-26 15:39:24.069 Connecting to ***************...
. 2015-08-26 15:39:24.085 Connected with ***************. Waiting for welcome message...
< 2015-08-26 15:39:24.116 220 (vsFTPd 2.0.5)
> 2015-08-26 15:39:24.116 USER *******
< 2015-08-26 15:39:24.132 331 Please specify the password.
> 2015-08-26 15:39:24.132 PASS *********
< 2015-08-26 15:39:24.163 230 Login successful.
> 2015-08-26 15:39:24.163 SYST
< 2015-08-26 15:39:24.194 215 UNIX Type: L8
> 2015-08-26 15:39:24.194 FEAT
< 2015-08-26 15:39:24.210 211-Features:
< 2015-08-26 15:39:24.210  EPRT
< 2015-08-26 15:39:24.226  EPSV
< 2015-08-26 15:39:24.226  MDTM
< 2015-08-26 15:39:24.226  PASV
< 2015-08-26 15:39:24.226  REST STREAM
< 2015-08-26 15:39:24.226  SIZE
< 2015-08-26 15:39:24.226  TVFS
< 2015-08-26 15:39:24.226 211 End
. 2015-08-26 15:39:24.226 Connected
. 2015-08-26 15:39:24.226 --------------------------------------------------------------------------
. 2015-08-26 15:39:24.226 Using FTP protocol.
. 2015-08-26 15:39:24.226 Doing startup conversation with host.
> 2015-08-26 15:39:24.241 PWD
< 2015-08-26 15:39:24.257 257 "/"
. 2015-08-26 15:39:24.257 Getting current directory name.
. 2015-08-26 15:39:24.257 Startup conversation with host finished.
< 2015-08-26 15:39:24.257 Script: Active session: [1] **************
> 2015-08-26 15:39:24.257 Script: get budget_out.txt
. 2015-08-26 15:39:24.257 Listing file "budget_out.txt".
. 2015-08-26 15:39:24.257 Retrieving file information...
> 2015-08-26 15:39:24.257 PWD
< 2015-08-26 15:39:24.288 257 "/"
> 2015-08-26 15:39:24.288 CWD /budget_out.txt
< 2015-08-26 15:39:24.304 550 Failed to change directory.
> 2015-08-26 15:39:24.304 TYPE I
< 2015-08-26 15:39:24.335 200 Switching to Binary mode.
> 2015-08-26 15:39:24.335 SIZE /budget_out.txt
< 2015-08-26 15:39:24.351 550 Could not get file size.
. 2015-08-26 15:39:24.351 Could not retrieve file information
< 2015-08-26 15:39:24.351 Script: Can't get attributes of file 'budget_out.txt'.
< 2015-08-26 15:39:24.351 Script: Could not retrieve file information
 
< 2015-08-26 15:39:24.351 Could not get file size.
. 2015-08-26 15:39:24.351 Script: Failed
. 2015-08-26 15:39:24.351 Script: Exit code: 1
. 2015-08-26 15:39:24.351 Disconnected from server

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,466
Location:
Prague, Czechia

2015-08-27

@TPMTL:

> 2015-08-26 15:39:24.335 SIZE /budget_out.txt

< 2015-08-26 15:39:24.351 550 Could not get file size.

The error comes from the FTP server. I do not know why it fails to retrieve file size.

Do you have access to FTP server logs?

Can you show us a log for file that works?

Reply with quote

mrsmalltalk
Joined:
2016-01-21
Posts:
10

2016-01-22 14:38

Meanwhile you can workaround the bug by configuring WinSCP to avoid MLST command.

For that you have to upgrade to WinSCP 5.6 beta and set Use MLSD command for directory listing to Off.

Hi all,

I installed 5.8.1 beta and set the MLSD setting to Off. I still couldn’t download the file (documented else where) and MLST still appeared in the log, so it appears MLSD = Off does not affect MLST. On a positive note using an * in a shortened filename led to success.

If you look at my post on this subject I posted a good log and a bad log to the same server and the same directory. I can send a good log on the same file that failed if you want it.

John

Reply with quote

martin◆

Site Admin

martin avatar

2016-01-25

I do not see any MLST in your log from the other post:

Can’t get attributes of file error during FTP download

Reply with quote

mrsmalltalk
Joined:
2016-01-21
Posts:
10

2016-01-26 02:00

Hi,

since I posted this I’ve been using the asterisk. I’ve attached a log which was successful and includes a reference to MLSD. With that said I’m totally new to FTP so in all probability it’s working as it should.

john

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,466
Location:
Prague, Czechia

2016-01-28

@mrsmalltalk: You are using scripting and you are invoking the session using a session URL. So if you had disabled that option somewhere in GUI, it has no effect on the script whatsoever.

If you want to disable the «Use MLSD command for directory listing» option in scripting, use:

open ftp://anonymous@192.168.2.100:2121/66DATA99/Input/BocceLog/ -rawsettings FtpUseMlsd=1

See https://winscp.net/eng/docs/rawsettings

Though I do not really understand why you want to set the option at all. What problem are you having? I see no relation of your script to this topic.

Reply with quote

stevet

Guest

2016-03-10 00:58

While not 100% full proof as in some cases, this method may match multiple files.

I used the following to get around the issue:

GetFiles("Testfile.xls*", "/downloaddir/")

If you have files that are like the following, the this method will not work for you. In my case, the files are always unique.

Testfile.xls
Testfile.xls.backup

Reply with quote

Charan Ghate

Guest

2016-03-17 15:26

I have getting this error only sometime. I am downloading same file from same server 100 times a day, out of 100 it work for 80 to 90, and fails for 10 with error

Can’t get attributes of file ‘/Test/data.csv’.

What is the reason behind this?

Please do the needful.

Reply with quote

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,466
Location:
Prague, Czechia

2016-03-17

@Charan Ghate: Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

Charan Ghate

Guest

2016-03-18 13:21

Thank you for your immediate response.

I am using WinSCP 5.7.6.5874 version.

The product is already in UAT, I have not getting this error in Dev and QA server, I am facing this only in UAT. For now it is not possible to make code changes to generate the Session log file. Can you please explain what are the possibilities of this error and what precaution is needed to avoid this exception? :( :( :(

Reply with quote

martin◆

Site Admin

martin avatar

2016-03-21

@Charan Ghate: I cannot give you any explanation without the log file.

Running a production code without having logging enabled is a major design fault.

Reply with quote

opti2k4

Guest

2016-04-13 15:58

Hi, I am having same issue

. 2016-04-13 07:53:45.373 Transfer done: 'C:ftpmyplumbingshowroomtest2.txt' [5]
> 2016-04-13 07:53:45.842 Script: rm -- "C:ftpmyplumbingshowroomtest2.txt"
. 2016-04-13 07:53:45.842 Listing file "C:ftpmyplumbingshowroomtest2.txt".
. 2016-04-13 07:53:45.842 Retrieving file information...
> 2016-04-13 07:53:45.842 PWD
< 2016-04-13 07:53:45.983 257 "/" is current directory.
> 2016-04-13 07:53:45.983 CWD /C:ftpmyplumbingshowroomtest2.txt
< 2016-04-13 07:53:46.139 550 The parameter is incorrect. 
> 2016-04-13 07:53:46.139 TYPE I
< 2016-04-13 07:53:46.280 200 Type set to I.
> 2016-04-13 07:53:46.280 SIZE /C:ftpmyplumbingshowroomtest2.txt
< 2016-04-13 07:53:46.436 550 The parameter is incorrect. 
. 2016-04-13 07:53:46.436 Could not retrieve file information
< 2016-04-13 07:53:46.436 Script: Can't get attributes of file 'C:ftpmyplumbingshowroomtest2.txt'.
< 2016-04-13 07:53:46.436 Script: Could not retrieve file information
 
< 2016-04-13 07:53:46.436 The parameter is incorrect.
. 2016-04-13 07:53:46.436 Script: Failed
> 2016-04-13 07:53:46.873 Script: exit
. 2016-04-13 07:53:46.873 Script: Exit code: 1
. 2016-04-13 07:53:46.873 Disconnected from server

Reply with quote

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,466
Location:
Prague, Czechia

2016-04-15

@opti2k4: No you are not.

Your problem is that you are trying to remove a local file with WinSCP rm command, which is designed to remove remote files.

If you want to remove uploaded files, use

Reply with quote

Advertisement

opti2k4

Guest

2016-04-15 22:34

@martin: Aha!

This is part of the code that is responsible for deletion. I am trying to delete local file after it is uploaded:

foreach ($upload in $synchronizationResult.Uploads)
{
    # Success or error?
    if ($upload.Error -eq $Null)
    {
        Write-Host ("Upload of {0} succeeded, removing from source" -f
            $upload.FileName)
        # Upload succeeded, remove file from source
 
        $removalResult = $session.RemoveFiles($session.EscapeFileMask($upload.FileName))
        if ($removalResult.IsSuccess)
        {
            Write-Host ("Removing of file {0} succeeded" -f
                $upload.FileName)
        }
        else
        {
            Write-Host ("Removing of file {0} failed" -f
                $upload.FileName)
        }
    }

Reply with quote

opti2k4

Guest

2016-04-15 23:12

OK it’s fixed

# Upload files to remote directory, collect results
$UploadResult = $session.Putfiles($localPath, $remotePath, $True)

Reply with quote

JvD

Guest

2016-07-21 10:34

I searched quite a while for «Can’t get attributes of file» while using a Windows Task with parameter.

The problem was in the parameter; the double quote before D:Guidance was one too much, because of the long string I didn’t notice it:

parameter:

/log=c:tempwinscp.log /command "open sftp://catalogger:catalogger@10.12.3.1/home/catalogger -hostkey=""ssh-rsa 1024 xx:xx:xx:xx..."" -rawsettings FtpUseMlsd=1" "get attema_cataloggerdata.txt "D:GuidanceCataloggerCatalogUpdateATT" "exit"

This works fine now:

action: "C:Program Files (x86)WinSCPWinSCP.exe"

parameter:

/log=c:tempwinscp.log /command "open sftp://catalogger:catalogger@10.12.3.1/home/catalogger -hostkey=""ssh-rsa 1024 xx:xx:xx:xx..."" -rawsettings FtpUseMlsd=1" "get attema_cataloggerdata.txt D:GuidanceCataloggerCatalogUpdateATT" "exit"
. 2016-07-21 11:25:22.594 --------------------------------------------------------------------------
. 2016-07-21 11:25:22.594 WinSCP Version 5.7.7 (Build 6257) (OS 6.1.7601 Service Pack 1 - Windows 7 Professional)
. 2016-07-21 11:25:22.594 Configuration: HKCUSoftwareMartin PrikrylWinSCP 2
. 2016-07-21 11:25:22.594 Log level: Normal
. 2016-07-21 11:25:22.594 Local account: BEHEERPC4Beheerpc
. 2016-07-21 11:25:22.594 Working directory: C:Windowssystem32
. 2016-07-21 11:25:22.594 Process ID: 2060
. 2016-07-21 11:25:22.594 Command-line: "C:Program Files (x86)WinSCPWinSCP.exe" /log=c:tempwinscp.log /command "open sftp://catalogger:catalogger@10.12.3.1/home/catalogger -hostkey=""ssh-rsa 1024 d9:a1:7e:b4:63:b3:4f:f4:94:86:6f:a9:ed:c5:92:67"" -rawsettings FtpUseMlsd=1" "get attema_cataloggerdata.txt "D:GuidanceCataloggerCatalogUpdateATT" "exit"
. 2016-07-21 11:25:22.594 Time zone: Current: GMT+2, Standard: GMT+1 (West-Europa (standaardtijd)), DST: GMT+2 (West-Europa (zomertijd)), DST Start: 27-3-2016, DST End: 30-10-2016
. 2016-07-21 11:25:22.594 Login time: donderdag 21 juli 2016 11:25:22
. 2016-07-21 11:25:22.594 --------------------------------------------------------------------------
. 2016-07-21 11:25:22.594 Script: Retrospectively logging previous script records:
> 2016-07-21 11:25:22.594 Script: open sftp://catalogger:***@10.12.3.1/home/catalogger -hostkey="ssh-rsa 1024 d9:a1:7e:b4:63:b3:4f:f4:94:86:6f:a9:ed:c5:92:67" -rawsettings FtpUseMlsd=1
. 2016-07-21 11:25:22.595 --------------------------------------------------------------------------
. 2016-07-21 11:25:22.595 Session name: catalogger@10.12.3.1 (Ad-Hoc site)
. 2016-07-21 11:25:22.595 Host name: 10.12.3.1 (Port: 22)
. 2016-07-21 11:25:22.595 User name: catalogger (Password: Yes, Key file: No)
. 2016-07-21 11:25:22.595 Tunnel: No
. 2016-07-21 11:25:22.595 Transfer Protocol: SFTP
. 2016-07-21 11:25:22.595 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2016-07-21 11:25:22.595 Disable Nagle: No
. 2016-07-21 11:25:22.595 Proxy: none
. 2016-07-21 11:25:22.595 Send buffer: 262144
. 2016-07-21 11:25:22.595 SSH protocol version: 2; Compression: No
. 2016-07-21 11:25:22.595 Bypass authentication: No
. 2016-07-21 11:25:22.595 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2016-07-21 11:25:22.595 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2016-07-21 11:25:22.595 KEX: dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN
. 2016-07-21 11:25:22.595 SSH Bugs: A,A,A,A,A,A,A,A,A,A,A,A
. 2016-07-21 11:25:22.595 Simple channel: Yes
. 2016-07-21 11:25:22.595 Return code variable: Autodetect; Lookup user groups: A
. 2016-07-21 11:25:22.595 Shell: default
. 2016-07-21 11:25:22.595 EOL: 0, UTF: 2
. 2016-07-21 11:25:22.595 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2016-07-21 11:25:22.595 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2016-07-21 11:25:22.595 SFTP Bugs: A,A
. 2016-07-21 11:25:22.595 SFTP Server: default
. 2016-07-21 11:25:22.595 Local directory: default, Remote directory: /home/catalogger, Update: Yes, Cache: Yes
. 2016-07-21 11:25:22.595 Cache directory changes: Yes, Permanent: Yes
. 2016-07-21 11:25:22.595 DST mode: 1
. 2016-07-21 11:25:22.595 --------------------------------------------------------------------------
. 2016-07-21 11:25:22.595 Looking up host "10.12.3.1"
. 2016-07-21 11:25:22.595 Connecting to 10.12.3.1 port 22
. 2016-07-21 11:25:22.617 Server version: SSH-2.0-OpenSSH_5.1
. 2016-07-21 11:25:22.617 Using SSH protocol version 2
. 2016-07-21 11:25:22.617 We claim version: SSH-2.0-WinSCP_release_5.7.7
. 2016-07-21 11:25:22.619 Doing Diffie-Hellman group exchange
. 2016-07-21 11:25:22.621 Doing Diffie-Hellman key exchange with hash SHA-256
. 2016-07-21 11:25:23.850 Verifying host key rsa2 0x23,0xbcf72813731a70f5 a9b164776653f5fe 043aa55ea71b650f 9aed796c07e0815a 777cd23831413581 0dc72cbcc07f4117 9e4dc76f4f33d819 a8141628fa994627 7847e4a6c8c8af01 c82e85db0b077606 128e0fa6d9634cfc 4079b1374a665c03 bca3913ce2bc3453 af1937f37fa34cdf c117054619becb59 6168de9201b7cce1  with fingerprint ssh-rsa 1024 d9:a1:7e:b4:63:b3:4f:f4:94:86:6f:a9:ed:c5:92:67
. 2016-07-21 11:25:23.850 Host key matches configured key
. 2016-07-21 11:25:23.850 Host key fingerprint is:
. 2016-07-21 11:25:23.850 ssh-rsa 1024 d9:a1:7e:b4:63:b3:4f:f4:94:86:6f:a9:ed:c5:92:67
. 2016-07-21 11:25:23.850 Initialised AES-256 SDCTR client->server encryption
. 2016-07-21 11:25:23.850 Initialised HMAC-SHA1 client->server MAC algorithm
. 2016-07-21 11:25:23.850 Initialised AES-256 SDCTR server->client encryption
. 2016-07-21 11:25:23.851 Initialised HMAC-SHA1 server->client MAC algorithm
! 2016-07-21 11:25:23.891 Using username "catalogger".
. 2016-07-21 11:25:23.892 Attempting keyboard-interactive authentication
. 2016-07-21 11:25:23.895 Prompt (keyboard interactive, "SSH server authentication", "Using keyboard-interactive authentication.", "Password: ")
. 2016-07-21 11:25:23.895 Using stored password.
. 2016-07-21 11:25:23.900 Prompt (keyboard interactive, "SSH server authentication", <no instructions>, <no prompt>)
. 2016-07-21 11:25:23.901 Ignoring empty SSH server authentication request
. 2016-07-21 11:25:23.901 Access granted
. 2016-07-21 11:25:23.901 Opening session as main channel
. 2016-07-21 11:25:23.904 Opened main channel
. 2016-07-21 11:25:23.942 Started a shell/command
. 2016-07-21 11:25:23.942 --------------------------------------------------------------------------
. 2016-07-21 11:25:23.942 Using SFTP protocol.
. 2016-07-21 11:25:23.942 Doing startup conversation with host.
> 2016-07-21 11:25:23.942 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2016-07-21 11:25:23.990 Type: SSH_FXP_VERSION, Size: 95, Number: -1
. 2016-07-21 11:25:23.990 SFTP version 3 negotiated.
. 2016-07-21 11:25:23.990 Unknown server extension posix-rename@openssh.com="1"
. 2016-07-21 11:25:23.990 Supports statvfs@openssh.com extension version "2"
. 2016-07-21 11:25:23.990 Unknown server extension fstatvfs@openssh.com="2"
. 2016-07-21 11:25:23.990 We believe the server has signed timestamps bug
. 2016-07-21 11:25:23.990 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 string are not mandatory
. 2016-07-21 11:25:23.990 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2016-07-21 11:25:23.990 Changing directory to "/home/catalogger".
. 2016-07-21 11:25:23.990 Getting real path for '/home/catalogger'
> 2016-07-21 11:25:23.990 Type: SSH_FXP_REALPATH, Size: 25, Number: 16
< 2016-07-21 11:25:23.990 Type: SSH_FXP_NAME, Size: 53, Number: 16
. 2016-07-21 11:25:23.990 Real path is '/home/catalogger'
. 2016-07-21 11:25:23.991 Trying to open directory "/home/catalogger".
> 2016-07-21 11:25:23.991 Type: SSH_FXP_LSTAT, Size: 25, Number: 263
< 2016-07-21 11:25:23.991 Type: SSH_FXP_ATTRS, Size: 37, Number: 263
. 2016-07-21 11:25:23.991 Getting current directory name.
. 2016-07-21 11:25:23.991 Startup conversation with host finished.
< 2016-07-21 11:25:23.991 Script: Active session: [1] catalogger@10.12.3.1
> 2016-07-21 11:25:23.991 Script: get attema_cataloggerdata.txt D:GuidanceCataloggerCatalogUpdateATT exit
. 2016-07-21 11:25:23.992 Listing file "attema_cataloggerdata.txt".
> 2016-07-21 11:25:23.992 Type: SSH_FXP_LSTAT, Size: 51, Number: 519
< 2016-07-21 11:25:23.993 Type: SSH_FXP_ATTRS, Size: 37, Number: 519
. 2016-07-21 11:25:23.993 attema_cataloggerdata.txt;-;211422;2016-07-21T05:12:04.000Z;"" [0];"" [0];rwxr-xr-x;0
. 2016-07-21 11:25:23.993 Listing file "D:GuidanceCataloggerCatalogUpdateATT".
> 2016-07-21 11:25:23.993 Type: SSH_FXP_LSTAT, Size: 68, Number: 775
< 2016-07-21 11:25:23.993 Type: SSH_FXP_STATUS, Size: 29, Number: 775
< 2016-07-21 11:25:23.993 Status code: 2, Message: 775, Server: No such file, Language:  
< 2016-07-21 11:25:23.994 Script: Can't get attributes of file 'D:GuidanceCataloggerCatalogUpdateATT'.
< 2016-07-21 11:25:23.994 Script: No such file or directory.
< 2016-07-21 11:25:23.994 Error code: 2
< 2016-07-21 11:25:23.994 Error message from server: No such file
. 2016-07-21 11:25:23.994 Script: Failed
. 2016-07-21 11:25:23.994 Script: Exit code: 1
. 2016-07-21 11:25:23.994 Closing connection.
. 2016-07-21 11:25:23.994 Sending special code: 12
. 2016-07-21 11:25:23.995 Sent EOF message

Reply with quote

martin◆

Site Admin

martin avatar

2016-07-22

You can now have WinSCP generate the command-line for you:

https://winscp.net/eng/docs/guide_automation#generating

Reply with quote

Advertisement

MFrench
Joined:
2017-01-31
Posts:
4
Location:
London

2017-02-27 14:58

Hi,

I’m also facing the same problem trying to download files using c#.

I can connect to the FTP server, I can get the directory listing fine, when I ask to download one of the files, I get the error

Can’t get attributes of file ‘/s685114.SLBSE766_20170203030427’. Could not retrieve file information Requested action aborted: local error in processing

This error happens either inputting a specific file name or just passing back to the code the first entry from the directory listing.

I’ve also setup the suggested Raw setting. Code:

sessionOptions.AddRawSettings("FtpUseMlsd", "1");

and I still get the same error.

When adding the wildcard * to the file name, it works fine.

Attaching the log generated here – I’ve replaced all the sensitive information like username, password, IP address and company name for the HOST of the FTP

Can you please take a look and let me know if I’m doing something wrong?

Thanks

  • log.txt (6.35 KB)

Reply with quote

martin◆

Site Admin

martin avatar

2017-03-02

@MFrench: Unless you can fix the server, appending the * to the filename is probably the best workaround. It makes WinSCP retrieve file data using a full directory listing (and filtering the files by the file mask), instead of using the SIZE and MDTM commands.

Reply with quote

MFrench
Joined:
2017-01-31
Posts:
4
Location:
London

2017-03-02 12:19

Thank you for checking. I was afraid that I was doing something wrong in the code.

Unfortunately it’s not our server – it belongs to an external company.

I will keep the implementation with the wildcard search.

Reply with quote

arvy_p

Guest

2017-11-23 21:38

I was running into the «can’t get attributes» issue, and found that I could resolve it by setting FtpMode to FtpMode.Active in the SessionOptions. In Passive mode, the file info comes across an unpredictable port, but in Active, it’s always port 20.

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar

2017-11-27

@arvy_p: If the passive mode does not work, it’s usually due to an FTP server or network misconfiguration.

See FTP Connection Modes (Active vs. Passive)

Reply with quote

Advertisement

  • Reply to topic
  • Log in

You can post new topics in this forum

«Can’t get attributes of file»

  • Reply to topic
  • Log in

Advertisement

Guest

2006-12-13 19:05

I am brand new to WinSCP. I’ve looked at the FAQ and troubleshooting guide and don’t find the answer to this problem.

When I am trying to transfer a binary file I receive the error

Can’t get attributes of file (filename).

The additional information from the More button is

Invalid argument to date encode.

Do you know what is causing the error message and how I resolve this?

Thanks!

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,408
Location:
Prague, Czechia

2006-12-13

I guess you are uploading files, are you? Where from? What version of WinSCP are you using? Have you tried the latest one?

Reply with quote

Guest

2006-12-13 21:58

Thanks for your reply. Yes, I am uploading files from a local drive. The WinSCP version is 3.7.6 (build 306). I can try downloading the latest version for this limited use. I normally just ftp to the other unix servers. This is a temporary server which the Unix admin recommended using WinSCP instead of ftp. I’ll try the new version and if that is unsuccessful I’ll contact the server admin.

Thanks!

Reply with quote

Guest2

Guest

2008-05-05 18:49

I have got the same error. I solved it removing archive check in the file properties. Yan

Reply with quote

Guest3

Guest

2008-08-06 15:12

@Guest2: Just exactly how did you do this? I’m having the same problem. Where is archive check located?

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar

2008-08-07

@Guest3: I guess @Guest2 meant the Properties box in Windows Explorer.

Reply with quote

bitjunky

Guest

2012-10-23 19:17

Just recently had this problem when our provider moved to ftp.drivehq.com

Not sure why but if I use a wildcard (*) in the filename it worked!

Example:

or

Reply with quote

martin◆

Site Admin

martin avatar

2012-10-25

@bitjunky: What version of WinSCP are you using?

Reply with quote

jreopelle
Joined:
2014-06-27
Posts:
1
Location:
Green Bay, WI

2014-06-27 19:49

@martin: I am running 5.5.4 and I am seeing the same thing with ftp.drivehq.com. Will there be a fix for this situation?

  • sftp.log (51.35 KB)

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,408
Location:
Prague, Czechia

2014-07-13

@jreopelle: Thanks for your report. I was able to reproduce the problem against ftp.hrivehq.com server.

I believe it’s a bug on their side. I have submitted a report on their support forum:

«Bad sequence of commands» error in reponse to MLST command. DriveHQ Cloud IT Service Support Forum

Meanwhile you can workaround the bug by configuring WinSCP to avoid MLST command.

For that you have to upgrade to WinSCP 5.6 beta and set Use MLSD command for directory listing to Off.

https://winscp.net/eng/docs/ui_login_ftp

(The option affects also MLST command, but only since 5.6 beta:

Bug 1181 – Make «Use MLSD command for directory listing» affect also use of MLST command)

Reply with quote

ftp.DriveHQ.com

Guest

2014-07-14 23:24

Thank you for reporting the problem to DriveHQ. It seems our engineers mixed MLST and MLSD, and required a data connection for MLST… The bug has been fixed.

Reply with quote

martin◆

Site Admin

martin avatar

2014-07-15

@ftp.DriveHQ.com: Thanks for your feedback!

Reply with quote

ziotibia81
Joined:
2015-03-23
Posts:
2

2015-03-23 15:32

Hello,

I revive this old post.

I’m using WinSCP scripting to download a file from a local instance of ownCloud.

The protocol is WebDAV. I have the same problem described here… In my case:

Can’t get attributes of file (filename)

successfully download.

WinSCP is version 5.7.1525

ownCloud version 8.0.2

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,408
Location:
Prague, Czechia

2015-03-25

@ziotibia81: Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

ziotibia81
Joined:
2015-03-23
Posts:
2

2015-03-25 11:33

added private attachment

  • log-success.txt (22.19 KB, Private file)

Description: Log of regular download

  • log-fail.txt (17.65 KB, Private file)

Description: Log of failed download

Reply with quote

Guest4

Guest

2015-03-25 18:20

I have got the same error, but I can’t find workaround.

If I put * in file name I’ve got

Error listing directory ‘/MyDirName’.

500 Internal Server Error

A)bort, (R)etry, (S)kip: Abort

If I put exact file name I’ve got

Can’t get attributes of file ‘MyFileName.zip’.

500 Internal Server Error

I use WebDAV protocol. WinSCP Version 5.7 (Build 5125)

Could you please help on it?

Thank you in advance!

Reply with quote

Alexander.Moiseev

Guest

2015-03-26 10:27

I’ve got the same error with WinSCP Version 5.7.1 (Build 5235)

I used script and .NET assembly.

And I used proxy for HTTP.

Reply with quote

Advertisement

Alexander.Moiseev

Guest

2015-03-27 08:23

Dear Martin,

Are there any good news regarding this issue?

Thank you in advance!

Reply with quote

martin◆

Site Admin

martin avatar

2015-03-30

Reply with quote

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,408
Location:
Prague, Czechia

2015-03-30

@Guest4: Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

TPMTL

Guest

2015-08-26 20:45

Hello,

We have the same issue.

On the same FTP server, one file works, another one gives the following error:

Can’t get attributes of file ‘budget_out.txt’.

Could not retrieve file information

Could not get file size.

Any help would be appreciated.

Thank you!

 2015-08-26 15:39:24.054 --------------------------------------------------------------------------
. 2015-08-26 15:39:24.054 WinSCP Version 5.7.5 (Build 5665) (OS 6.3.9600 - Windows Server 2012 R2 Datacenter)
. 2015-08-26 15:39:24.054 Configuration: HKCUSoftwareMartin PrikrylWinSCP 2
. 2015-08-26 15:39:24.054 Log level: Normal
. 2015-08-26 15:39:24.054 Local account: ***********************
. 2015-08-26 15:39:24.054 Working directory: C:DonneesRSS
. 2015-08-26 15:39:24.054 Process ID: 4872
. 2015-08-26 15:39:24.054 Command-line: "c:winscpWinSCP.exe" /console=575 /consoleinstance=_1912_411 "/command" "open ftp://**********************/" "get budget_out.txt" "exit" "/log=C:ftpscp.log" 
. 2015-08-26 15:39:24.054 Time zone: Current: GMT-4, Standard: GMT-5 (Eastern Standard Time), DST: GMT-4 (Eastern Daylight Time), DST Start: 3/8/2015, DST End: 11/1/2015
. 2015-08-26 15:39:24.054 Login time: Wednesday, August 26, 2015 3:39:24 PM
. 2015-08-26 15:39:24.054 --------------------------------------------------------------------------
. 2015-08-26 15:39:24.054 Script: Retrospectively logging previous script records:
> 2015-08-26 15:39:24.054 Script: open ftp://*******************/
. 2015-08-26 15:39:24.054 --------------------------------------------------------------------------
. 2015-08-26 15:39:24.054 Session name: ***************(Ad-Hoc site)
. 2015-08-26 15:39:24.054 Host name: **************** (Port: 21)
. 2015-08-26 15:39:24.054 User name: ****** (Password: Yes, Key file: No)
. 2015-08-26 15:39:24.054 Transfer Protocol: FTP
. 2015-08-26 15:39:24.054 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2015-08-26 15:39:24.054 Disable Nagle: No
. 2015-08-26 15:39:24.054 Proxy: none
. 2015-08-26 15:39:24.054 Send buffer: 262144
. 2015-08-26 15:39:24.054 UTF: 2
. 2015-08-26 15:39:24.054 FTP: FTPS: None; Passive: Yes [Force IP: A]; MLSD: A [List all: A]
. 2015-08-26 15:39:24.054 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-08-26 15:39:24.054 Cache directory changes: Yes, Permanent: Yes
. 2015-08-26 15:39:24.054 Timezone offset: 0h 0m
. 2015-08-26 15:39:24.054 --------------------------------------------------------------------------
. 2015-08-26 15:39:24.069 Connecting to ***************...
. 2015-08-26 15:39:24.085 Connected with ***************. Waiting for welcome message...
< 2015-08-26 15:39:24.116 220 (vsFTPd 2.0.5)
> 2015-08-26 15:39:24.116 USER *******
< 2015-08-26 15:39:24.132 331 Please specify the password.
> 2015-08-26 15:39:24.132 PASS *********
< 2015-08-26 15:39:24.163 230 Login successful.
> 2015-08-26 15:39:24.163 SYST
< 2015-08-26 15:39:24.194 215 UNIX Type: L8
> 2015-08-26 15:39:24.194 FEAT
< 2015-08-26 15:39:24.210 211-Features:
< 2015-08-26 15:39:24.210  EPRT
< 2015-08-26 15:39:24.226  EPSV
< 2015-08-26 15:39:24.226  MDTM
< 2015-08-26 15:39:24.226  PASV
< 2015-08-26 15:39:24.226  REST STREAM
< 2015-08-26 15:39:24.226  SIZE
< 2015-08-26 15:39:24.226  TVFS
< 2015-08-26 15:39:24.226 211 End
. 2015-08-26 15:39:24.226 Connected
. 2015-08-26 15:39:24.226 --------------------------------------------------------------------------
. 2015-08-26 15:39:24.226 Using FTP protocol.
. 2015-08-26 15:39:24.226 Doing startup conversation with host.
> 2015-08-26 15:39:24.241 PWD
< 2015-08-26 15:39:24.257 257 "/"
. 2015-08-26 15:39:24.257 Getting current directory name.
. 2015-08-26 15:39:24.257 Startup conversation with host finished.
< 2015-08-26 15:39:24.257 Script: Active session: [1] **************
> 2015-08-26 15:39:24.257 Script: get budget_out.txt
. 2015-08-26 15:39:24.257 Listing file "budget_out.txt".
. 2015-08-26 15:39:24.257 Retrieving file information...
> 2015-08-26 15:39:24.257 PWD
< 2015-08-26 15:39:24.288 257 "/"
> 2015-08-26 15:39:24.288 CWD /budget_out.txt
< 2015-08-26 15:39:24.304 550 Failed to change directory.
> 2015-08-26 15:39:24.304 TYPE I
< 2015-08-26 15:39:24.335 200 Switching to Binary mode.
> 2015-08-26 15:39:24.335 SIZE /budget_out.txt
< 2015-08-26 15:39:24.351 550 Could not get file size.
. 2015-08-26 15:39:24.351 Could not retrieve file information
< 2015-08-26 15:39:24.351 Script: Can't get attributes of file 'budget_out.txt'.
< 2015-08-26 15:39:24.351 Script: Could not retrieve file information
 
< 2015-08-26 15:39:24.351 Could not get file size.
. 2015-08-26 15:39:24.351 Script: Failed
. 2015-08-26 15:39:24.351 Script: Exit code: 1
. 2015-08-26 15:39:24.351 Disconnected from server

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,408
Location:
Prague, Czechia

2015-08-27

@TPMTL:

> 2015-08-26 15:39:24.335 SIZE /budget_out.txt

< 2015-08-26 15:39:24.351 550 Could not get file size.

The error comes from the FTP server. I do not know why it fails to retrieve file size.

Do you have access to FTP server logs?

Can you show us a log for file that works?

Reply with quote

mrsmalltalk
Joined:
2016-01-21
Posts:
10

2016-01-22 14:38

Meanwhile you can workaround the bug by configuring WinSCP to avoid MLST command.

For that you have to upgrade to WinSCP 5.6 beta and set Use MLSD command for directory listing to Off.

Hi all,

I installed 5.8.1 beta and set the MLSD setting to Off. I still couldn’t download the file (documented else where) and MLST still appeared in the log, so it appears MLSD = Off does not affect MLST. On a positive note using an * in a shortened filename led to success.

If you look at my post on this subject I posted a good log and a bad log to the same server and the same directory. I can send a good log on the same file that failed if you want it.

John

Reply with quote

martin◆

Site Admin

martin avatar

2016-01-25

I do not see any MLST in your log from the other post:

Can’t get attributes of file error during FTP download

Reply with quote

mrsmalltalk
Joined:
2016-01-21
Posts:
10

2016-01-26 02:00

Hi,

since I posted this I’ve been using the asterisk. I’ve attached a log which was successful and includes a reference to MLSD. With that said I’m totally new to FTP so in all probability it’s working as it should.

john

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,408
Location:
Prague, Czechia

2016-01-28

@mrsmalltalk: You are using scripting and you are invoking the session using a session URL. So if you had disabled that option somewhere in GUI, it has no effect on the script whatsoever.

If you want to disable the «Use MLSD command for directory listing» option in scripting, use:

open ftp://anonymous@192.168.2.100:2121/66DATA99/Input/BocceLog/ -rawsettings FtpUseMlsd=1

See https://winscp.net/eng/docs/rawsettings

Though I do not really understand why you want to set the option at all. What problem are you having? I see no relation of your script to this topic.

Reply with quote

stevet

Guest

2016-03-10 00:58

While not 100% full proof as in some cases, this method may match multiple files.

I used the following to get around the issue:

GetFiles("Testfile.xls*", "/downloaddir/")

If you have files that are like the following, the this method will not work for you. In my case, the files are always unique.

Testfile.xls
Testfile.xls.backup

Reply with quote

Charan Ghate

Guest

2016-03-17 15:26

I have getting this error only sometime. I am downloading same file from same server 100 times a day, out of 100 it work for 80 to 90, and fails for 10 with error

Can’t get attributes of file ‘/Test/data.csv’.

What is the reason behind this?

Please do the needful.

Reply with quote

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,408
Location:
Prague, Czechia

2016-03-17

@Charan Ghate: Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

Charan Ghate

Guest

2016-03-18 13:21

Thank you for your immediate response.

I am using WinSCP 5.7.6.5874 version.

The product is already in UAT, I have not getting this error in Dev and QA server, I am facing this only in UAT. For now it is not possible to make code changes to generate the Session log file. Can you please explain what are the possibilities of this error and what precaution is needed to avoid this exception? :( :( :(

Reply with quote

martin◆

Site Admin

martin avatar

2016-03-21

@Charan Ghate: I cannot give you any explanation without the log file.

Running a production code without having logging enabled is a major design fault.

Reply with quote

opti2k4

Guest

2016-04-13 15:58

Hi, I am having same issue

. 2016-04-13 07:53:45.373 Transfer done: 'C:ftpmyplumbingshowroomtest2.txt' [5]
> 2016-04-13 07:53:45.842 Script: rm -- "C:ftpmyplumbingshowroomtest2.txt"
. 2016-04-13 07:53:45.842 Listing file "C:ftpmyplumbingshowroomtest2.txt".
. 2016-04-13 07:53:45.842 Retrieving file information...
> 2016-04-13 07:53:45.842 PWD
< 2016-04-13 07:53:45.983 257 "/" is current directory.
> 2016-04-13 07:53:45.983 CWD /C:ftpmyplumbingshowroomtest2.txt
< 2016-04-13 07:53:46.139 550 The parameter is incorrect. 
> 2016-04-13 07:53:46.139 TYPE I
< 2016-04-13 07:53:46.280 200 Type set to I.
> 2016-04-13 07:53:46.280 SIZE /C:ftpmyplumbingshowroomtest2.txt
< 2016-04-13 07:53:46.436 550 The parameter is incorrect. 
. 2016-04-13 07:53:46.436 Could not retrieve file information
< 2016-04-13 07:53:46.436 Script: Can't get attributes of file 'C:ftpmyplumbingshowroomtest2.txt'.
< 2016-04-13 07:53:46.436 Script: Could not retrieve file information
 
< 2016-04-13 07:53:46.436 The parameter is incorrect.
. 2016-04-13 07:53:46.436 Script: Failed
> 2016-04-13 07:53:46.873 Script: exit
. 2016-04-13 07:53:46.873 Script: Exit code: 1
. 2016-04-13 07:53:46.873 Disconnected from server

Reply with quote

martin◆

Site Admin

martin avatar
Joined:
2002-12-10
Posts:
38,408
Location:
Prague, Czechia

2016-04-15

@opti2k4: No you are not.

Your problem is that you are trying to remove a local file with WinSCP rm command, which is designed to remove remote files.

If you want to remove uploaded files, use

Reply with quote

Advertisement

opti2k4

Guest

2016-04-15 22:34

@martin: Aha!

This is part of the code that is responsible for deletion. I am trying to delete local file after it is uploaded:

foreach ($upload in $synchronizationResult.Uploads)
{
    # Success or error?
    if ($upload.Error -eq $Null)
    {
        Write-Host ("Upload of {0} succeeded, removing from source" -f
            $upload.FileName)
        # Upload succeeded, remove file from source
 
        $removalResult = $session.RemoveFiles($session.EscapeFileMask($upload.FileName))
        if ($removalResult.IsSuccess)
        {
            Write-Host ("Removing of file {0} succeeded" -f
                $upload.FileName)
        }
        else
        {
            Write-Host ("Removing of file {0} failed" -f
                $upload.FileName)
        }
    }

Reply with quote

opti2k4

Guest

2016-04-15 23:12

OK it’s fixed

# Upload files to remote directory, collect results
$UploadResult = $session.Putfiles($localPath, $remotePath, $True)

Reply with quote

JvD

Guest

2016-07-21 10:34

I searched quite a while for «Can’t get attributes of file» while using a Windows Task with parameter.

The problem was in the parameter; the double quote before D:Guidance was one too much, because of the long string I didn’t notice it:

parameter:

/log=c:tempwinscp.log /command "open sftp://catalogger:catalogger@10.12.3.1/home/catalogger -hostkey=""ssh-rsa 1024 xx:xx:xx:xx..."" -rawsettings FtpUseMlsd=1" "get attema_cataloggerdata.txt "D:GuidanceCataloggerCatalogUpdateATT" "exit"

This works fine now:

action: "C:Program Files (x86)WinSCPWinSCP.exe"

parameter:

/log=c:tempwinscp.log /command "open sftp://catalogger:catalogger@10.12.3.1/home/catalogger -hostkey=""ssh-rsa 1024 xx:xx:xx:xx..."" -rawsettings FtpUseMlsd=1" "get attema_cataloggerdata.txt D:GuidanceCataloggerCatalogUpdateATT" "exit"
. 2016-07-21 11:25:22.594 -------------------------------------------------------------------------- . 2016-07-21 11:25:22.594 WinSCP Version 5.7.7 (Build 6257) (OS 6.1.7601 Service Pack 1 - Windows 7 Professional) . 2016-07-21 11:25:22.594 Configuration: HKCUSoftwareMartin PrikrylWinSCP 2 . 2016-07-21 11:25:22.594 Log level: Normal . 2016-07-21 11:25:22.594 Local account: BEHEERPC4Beheerpc . 2016-07-21 11:25:22.594 Working directory: C:Windowssystem32 . 2016-07-21 11:25:22.594 Process ID: 2060 . 2016-07-21 11:25:22.594 Command-line: "C:Program Files (x86)WinSCPWinSCP.exe" /log=c:tempwinscp.log /command "open sftp://catalogger:catalogger@10.12.3.1/home/catalogger -hostkey=""ssh-rsa 1024 d9:a1:7e:b4:63:b3:4f:f4:94:86:6f:a9:ed:c5:92:67"" -rawsettings FtpUseMlsd=1" "get attema_cataloggerdata.txt "D:GuidanceCataloggerCatalogUpdateATT" "exit" . 2016-07-21 11:25:22.594 Time zone: Current: GMT+2, Standard: GMT+1 (West-Europa (standaardtijd)), DST: GMT+2 (West-Europa (zomertijd)), DST Start: 27-3-2016, DST End: 30-10-2016 . 2016-07-21 11:25:22.594 Login time: donderdag 21 juli 2016 11:25:22 . 2016-07-21 11:25:22.594 -------------------------------------------------------------------------- . 2016-07-21 11:25:22.594 Script: Retrospectively logging previous script records: > 2016-07-21 11:25:22.594 Script: open sftp://catalogger:***@10.12.3.1/home/catalogger -hostkey="ssh-rsa 1024 d9:a1:7e:b4:63:b3:4f:f4:94:86:6f:a9:ed:c5:92:67" -rawsettings FtpUseMlsd=1 . 2016-07-21 11:25:22.595 -------------------------------------------------------------------------- . 2016-07-21 11:25:22.595 Session name: catalogger@10.12.3.1 (Ad-Hoc site) . 2016-07-21 11:25:22.595 Host name: 10.12.3.1 (Port: 22) . 2016-07-21 11:25:22.595 User name: catalogger (Password: Yes, Key file: No) . 2016-07-21 11:25:22.595 Tunnel: No . 2016-07-21 11:25:22.595 Transfer Protocol: SFTP . 2016-07-21 11:25:22.595 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec . 2016-07-21 11:25:22.595 Disable Nagle: No . 2016-07-21 11:25:22.595 Proxy: none . 2016-07-21 11:25:22.595 Send buffer: 262144 . 2016-07-21 11:25:22.595 SSH protocol version: 2; Compression: No . 2016-07-21 11:25:22.595 Bypass authentication: No . 2016-07-21 11:25:22.595 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No . 2016-07-21 11:25:22.595 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No . 2016-07-21 11:25:22.595 KEX: dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN . 2016-07-21 11:25:22.595 SSH Bugs: A,A,A,A,A,A,A,A,A,A,A,A . 2016-07-21 11:25:22.595 Simple channel: Yes . 2016-07-21 11:25:22.595 Return code variable: Autodetect; Lookup user groups: A . 2016-07-21 11:25:22.595 Shell: default . 2016-07-21 11:25:22.595 EOL: 0, UTF: 2 . 2016-07-21 11:25:22.595 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes . 2016-07-21 11:25:22.595 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No . 2016-07-21 11:25:22.595 SFTP Bugs: A,A . 2016-07-21 11:25:22.595 SFTP Server: default . 2016-07-21 11:25:22.595 Local directory: default, Remote directory: /home/catalogger, Update: Yes, Cache: Yes . 2016-07-21 11:25:22.595 Cache directory changes: Yes, Permanent: Yes . 2016-07-21 11:25:22.595 DST mode: 1 . 2016-07-21 11:25:22.595 -------------------------------------------------------------------------- . 2016-07-21 11:25:22.595 Looking up host "10.12.3.1" . 2016-07-21 11:25:22.595 Connecting to 10.12.3.1 port 22 . 2016-07-21 11:25:22.617 Server version: SSH-2.0-OpenSSH_5.1 . 2016-07-21 11:25:22.617 Using SSH protocol version 2 . 2016-07-21 11:25:22.617 We claim version: SSH-2.0-WinSCP_release_5.7.7 . 2016-07-21 11:25:22.619 Doing Diffie-Hellman group exchange . 2016-07-21 11:25:22.621 Doing Diffie-Hellman key exchange with hash SHA-256 . 2016-07-21 11:25:23.850 Verifying host key rsa2 0x23,0xbcf72813731a70f5 a9b164776653f5fe 043aa55ea71b650f 9aed796c07e0815a 777cd23831413581 0dc72cbcc07f4117 9e4dc76f4f33d819 a8141628fa994627 7847e4a6c8c8af01 c82e85db0b077606 128e0fa6d9634cfc 4079b1374a665c03 bca3913ce2bc3453 af1937f37fa34cdf c117054619becb59 6168de9201b7cce1  with fingerprint ssh-rsa 1024 d9:a1:7e:b4:63:b3:4f:f4:94:86:6f:a9:ed:c5:92:67 . 2016-07-21 11:25:23.850 Host key matches configured key . 2016-07-21 11:25:23.850 Host key fingerprint is: . 2016-07-21 11:25:23.850 ssh-rsa 1024 d9:a1:7e:b4:63:b3:4f:f4:94:86:6f:a9:ed:c5:92:67 . 2016-07-21 11:25:23.850 Initialised AES-256 SDCTR client->server encryption . 2016-07-21 11:25:23.850 Initialised HMAC-SHA1 client->server MAC algorithm . 2016-07-21 11:25:23.850 Initialised AES-256 SDCTR server->client encryption . 2016-07-21 11:25:23.851 Initialised HMAC-SHA1 server->client MAC algorithm ! 2016-07-21 11:25:23.891 Using username "catalogger". . 2016-07-21 11:25:23.892 Attempting keyboard-interactive authentication . 2016-07-21 11:25:23.895 Prompt (keyboard interactive, "SSH server authentication", "Using keyboard-interactive authentication.", "Password: ") . 2016-07-21 11:25:23.895 Using stored password. . 2016-07-21 11:25:23.900 Prompt (keyboard interactive, "SSH server authentication", <no instructions>, <no prompt>) . 2016-07-21 11:25:23.901 Ignoring empty SSH server authentication request . 2016-07-21 11:25:23.901 Access granted . 2016-07-21 11:25:23.901 Opening session as main channel . 2016-07-21 11:25:23.904 Opened main channel . 2016-07-21 11:25:23.942 Started a shell/command . 2016-07-21 11:25:23.942 -------------------------------------------------------------------------- . 2016-07-21 11:25:23.942 Using SFTP protocol. . 2016-07-21 11:25:23.942 Doing startup conversation with host. > 2016-07-21 11:25:23.942 Type: SSH_FXP_INIT, Size: 5, Number: -1 < 2016-07-21 11:25:23.990 Type: SSH_FXP_VERSION, Size: 95, Number: -1 . 2016-07-21 11:25:23.990 SFTP version 3 negotiated. . 2016-07-21 11:25:23.990 Unknown server extension posix-rename@openssh.com="1" . 2016-07-21 11:25:23.990 Supports statvfs@openssh.com extension version "2" . 2016-07-21 11:25:23.990 Unknown server extension fstatvfs@openssh.com="2" . 2016-07-21 11:25:23.990 We believe the server has signed timestamps bug . 2016-07-21 11:25:23.990 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 string are not mandatory . 2016-07-21 11:25:23.990 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes . 2016-07-21 11:25:23.990 Changing directory to "/home/catalogger". . 2016-07-21 11:25:23.990 Getting real path for '/home/catalogger' > 2016-07-21 11:25:23.990 Type: SSH_FXP_REALPATH, Size: 25, Number: 16 < 2016-07-21 11:25:23.990 Type: SSH_FXP_NAME, Size: 53, Number: 16 . 2016-07-21 11:25:23.990 Real path is '/home/catalogger' . 2016-07-21 11:25:23.991 Trying to open directory "/home/catalogger". > 2016-07-21 11:25:23.991 Type: SSH_FXP_LSTAT, Size: 25, Number: 263 < 2016-07-21 11:25:23.991 Type: SSH_FXP_ATTRS, Size: 37, Number: 263 . 2016-07-21 11:25:23.991 Getting current directory name. . 2016-07-21 11:25:23.991 Startup conversation with host finished. < 2016-07-21 11:25:23.991 Script: Active session: [1] catalogger@10.12.3.1 > 2016-07-21 11:25:23.991 Script: get attema_cataloggerdata.txt D:GuidanceCataloggerCatalogUpdateATT exit . 2016-07-21 11:25:23.992 Listing file "attema_cataloggerdata.txt". > 2016-07-21 11:25:23.992 Type: SSH_FXP_LSTAT, Size: 51, Number: 519 < 2016-07-21 11:25:23.993 Type: SSH_FXP_ATTRS, Size: 37, Number: 519 . 2016-07-21 11:25:23.993 attema_cataloggerdata.txt;-;211422;2016-07-21T05:12:04.000Z;"" [0];"" [0];rwxr-xr-x;0 . 2016-07-21 11:25:23.993 Listing file "D:GuidanceCataloggerCatalogUpdateATT". > 2016-07-21 11:25:23.993 Type: SSH_FXP_LSTAT, Size: 68, Number: 775 < 2016-07-21 11:25:23.993 Type: SSH_FXP_STATUS, Size: 29, Number: 775 < 2016-07-21 11:25:23.993 Status code: 2, Message: 775, Server: No such file, Language:  < 2016-07-21 11:25:23.994 Script: Can't get attributes of file 'D:GuidanceCataloggerCatalogUpdateATT'. < 2016-07-21 11:25:23.994 Script: No such file or directory. < 2016-07-21 11:25:23.994 Error code: 2 < 2016-07-21 11:25:23.994 Error message from server: No such file . 2016-07-21 11:25:23.994 Script: Failed . 2016-07-21 11:25:23.994 Script: Exit code: 1 . 2016-07-21 11:25:23.994 Closing connection. . 2016-07-21 11:25:23.994 Sending special code: 12 . 2016-07-21 11:25:23.995 Sent EOF message

Reply with quote

martin◆

Site Admin

martin avatar

2016-07-22

You can now have WinSCP generate the command-line for you:

https://winscp.net/eng/docs/guide_automation#generating

Reply with quote

Advertisement

MFrench
Joined:
2017-01-31
Posts:
4
Location:
London

2017-02-27 14:58

Hi,

I’m also facing the same problem trying to download files using c#.

I can connect to the FTP server, I can get the directory listing fine, when I ask to download one of the files, I get the error

Can’t get attributes of file ‘/s685114.SLBSE766_20170203030427’. Could not retrieve file information Requested action aborted: local error in processing

This error happens either inputting a specific file name or just passing back to the code the first entry from the directory listing.

I’ve also setup the suggested Raw setting. Code:

sessionOptions.AddRawSettings("FtpUseMlsd", "1");

and I still get the same error.

When adding the wildcard * to the file name, it works fine.

Attaching the log generated here – I’ve replaced all the sensitive information like username, password, IP address and company name for the HOST of the FTP

Can you please take a look and let me know if I’m doing something wrong?

Thanks

  • log.txt (6.35 KB)

Reply with quote

martin◆

Site Admin

martin avatar

2017-03-02

@MFrench: Unless you can fix the server, appending the * to the filename is probably the best workaround. It makes WinSCP retrieve file data using a full directory listing (and filtering the files by the file mask), instead of using the SIZE and MDTM commands.

Reply with quote

MFrench
Joined:
2017-01-31
Posts:
4
Location:
London

2017-03-02 12:19

Thank you for checking. I was afraid that I was doing something wrong in the code.

Unfortunately it’s not our server – it belongs to an external company.

I will keep the implementation with the wildcard search.

Reply with quote

arvy_p

Guest

2017-11-23 21:38

I was running into the «can’t get attributes» issue, and found that I could resolve it by setting FtpMode to FtpMode.Active in the SessionOptions. In Passive mode, the file info comes across an unpredictable port, but in Active, it’s always port 20.

Reply with quote

Advertisement

martin◆

Site Admin

martin avatar

2017-11-27

@arvy_p: If the passive mode does not work, it’s usually due to an FTP server or network misconfiguration.

See FTP Connection Modes (Active vs. Passive)

Reply with quote

Advertisement

  • Reply to topic
  • Log in

You can post new topics in this forum

Вопрос знатокам: Скачиваю уже 3 раз симс 4 с разных сайтов и все время выходит ошибка при установке:» Error: Could not get file size of file %s
Когда нажимаю ок, то выходит вторая ошибка:» Произошла ошибка при распаковке: Не совпадает контрольная сумма!
Unarc.dll вернул код ошибки: -12
ERROR: file D:GamesThe SIMS 4DataClientthumbnailsdeltapack1. pachage failed CRC chek»
Помогите пожалуйста :с
Ни один раз качала симс 4 и ошибок не было.

С уважением, Екатерина Шевелёва

Лучшие ответы

Тетяна:

если антивирусник включен- отключите

Oleg D.:

пытаетесь поставить пиратскую копию.
для начала игру нужно купить, проще всего сразу в origin:
s .origin m/ru-ru/store/buy/sims-4/mac-pc-download/base-game/standard-edition
скачать тоже оттуда.

elena borisova:

с этой таблеткой работает нормально
s .behance /gallery/48322883/The-Sims-4-FREE-DOWNLOAD-CRACKED-GAMES

Эдик Асадов:

меняй кряк
s .reddit m/user/daty65

Татьяна Зуй:

Проблема в ошибках синхронизации. Нужно оптимизировать систему и все начнет нормально работать!
Делается довольно просто. Подробно, как и чем,
можете тут глянуть gadgets-help /?p=2224

Видео-ответ

Это видео поможет разобраться

Ответы знатоков

Екатерина Кокина:

Проблема в ошибках синхронизации с системой. Проведите оптимизацию, и все будет нормально работать.
Делается довольно просто, чем и как, пошагово,
можете тут посмотреть gadgets-help /?p=2224

Наталья Трошина:

совет из интернета… попробуйтеНе знаю поможет кому или нет. Но у меня например ошыбка была когда я устанавливал игру, выскакивало сообщение что unarc.dll не может розархивировать файль игры, поетому я кинул папку игры в другую папку на компе и снова попытаться. Например: если у вас папка с игрой в загрузках то киньте папку на диск (с: /) и снова запустите. Обесняю для тех кто не понял как ето решит проблему, возможно путь к папке с игрой слишком длинный и програма unarc.dll просто не может туда добраться поетому вы бросаете её в корень диска там проге намного проще найти папку с игрой поскольку путь намного короче.

Не поможет, почитайте в инете.

Алена Алена:

У меня такое было, вернула диск, посоветовали прийти потом, чтобы взять диск перезаписанный с другой фирмы, ибо у этой хер что скачаешь. пришла, взяла диск, все нормально

Андрей Быков:

По проблеме с unarc.dll (номер ошибки не важен), есть варианты решения dll-files /unarc-dll

Dim4ik Rus:

Почитай вот здесь! dll-files /unarc-dll

максим Аушев:

Я тоже знаю если уван написано произошла ошибка при распаковке: невозможно считать данные unarc.dll вернул код ошибки -6 то заходим в Интернет и пишем скачать Unarc.dll заходим на люьой папавшийся сайт и качаем (если увас 64 питная система то качаем 2 файла если 32битная система то один).
Далее если 64 битная система то кидаем 2 файла которые скачали суда C:WindowsSystem32 и сюда C:WindowsSysWOW64 и всё наслождаемся закачкай игр.
Ну а если 32-х битная система то кидаем один файл вот сюда C:WindowsSystem32 и всё наслождаемся

Кристина Большакова:

Я тоже знаю если уван написано произошла ошибка при распаковке: невозможно считать данные unarc.dll вернул код ошибки -6 то заходим в Интернет и пишем скачать Unarc.dll заходим на люьой папавшийся сайт и качаем (если увас 64 питная система то качаем 2 файла если 32битная система то один).
Далее если 64 битная система то кидаем 2 файла которые скачали суда C:WindowsSystem32 и сюда C:WindowsSysWOW64 и всё наслождаемся закачкай игр.
Ну а если 32-х битная система то кидаем один файл вот сюда C:WindowsSystem32 и всё наслождаемся

Абросим Архипов:

Спрашивали тут уже, используй:

Маша Пес:

Помогите пожалуйста! Как с этим разделатся! Я делала все что могла и хрен мне на лопате выдает ошибку! Помогите! Я даже озу чистила и почти все с компа удалила и не хрена!

Алевтина Зверева:

удали полностью игру и ориджин ( если есть)
скачай здесь
games-repack.pp /load/simulation/the_sims_4_deluxe_edition_v_1_7_65_1020_2014_pc_124_repack_ot_xatab/14-1-0-35
это официальный сайт механики. Я здесь же скачивала. Если будут вопросы после установки то спрашивай. Я помогу.
Иногда игру блокирует антивирусник

Марианна Власова:

Обсуждали тут уже, используй:

I want to read a file which is on a remote ftp server to a variable. I tried reading with address

fopen("ftp://user:pass@localhost/filetoread");

and

$contents = file_get_contents('ftp://ftpuser:123456789@localhost/file.conf');
echo $contents;

Neither does work. I also tried to send directly GET request to the URL which also doesn’t work. How can I read the FTP file without downloading?

I checked the php warning which says:

PHP Warning: file_get_contents(ftp://…@localhost/file.conf): failed to open stream: FTP server reports 550 Could not get file size.
in /var/www/html/api/listfolder.php on line 2

I’m sure that the file exists

Martin Prikryl's user avatar

asked Apr 19, 2017 at 20:19

Metin Çetin's user avatar

0

The PHP FTP URL wrapper seems to require FTP SIZE command, what your FTP server does not support.

Use the ftp_fget instead:

$conn_id = ftp_connect('hostname');

ftp_login($conn_id, 'username', 'password');
ftp_pasv($conn_id, true);

$h = fopen('php://temp', 'r+');

ftp_fget($conn_id, $h, '/path/to/file', FTP_BINARY, 0);

$fstats = fstat($h);
fseek($h, 0);
$contents = fread($h, $fstats['size']); 

fclose($h);
ftp_close($conn_id);

(add error handling)

See PHP: How do I read a .txt file from FTP server into a variable?

answered Apr 21, 2017 at 10:49

Martin Prikryl's user avatar

Martin PrikrylMartin Prikryl

187k54 gold badges481 silver badges969 bronze badges

Based on @Martin Prikryl’s answer, here a revised one to work with any url format.

function getFtpUrlBinaryContents($url){
    $path_info = parse_url($url);
    $conn_id = ftp_connect($path_info['host'], $path_info['port'] ?? 21);
    if(isset($path_info['user'])){
        ftp_login($conn_id, $path_info['user'], $path_info['pass'] ?? '');
    }
    ftp_pasv($conn_id, true);

    $h = fopen('php://temp', 'r+');

    ftp_fget($conn_id, $h, $path_info['path'], FTP_BINARY, 0);
    $fstats = fstat($h);
    fseek($h, 0);
    $contents = fread($h, $fstats['size']);
    fclose($h);
    ftp_close($conn_id);
    return $contents;
}
$contents = getFtpUrlBinaryContents('ftp://ftpuser:123456789@localhost/file.conf');
echo $contents;

answered Jan 12, 2021 at 21:04

Jimmy Ilenloa's user avatar

I’m ftping the contents of a documents directory to my online file folder space from GoDaddy. I have the file overwrite settings set to overwrite on upload if file sizes are different.

The problem is that every single file size comparison for the transfer generates a could not get file size error (excerpt below). I used Filezilla to upload files initially and it did not throw any of these errors. (It couldn’t handle large files though and that’s why I’m testing out flashfxp)

Excerpt from transfer:

[R] 200 Switching to Binary mode.
[R] SIZE Tuloriad, The — John Ringo & Tom Kratman.mobi
[R] 550 Could not get file size.
[R] PASV
[R] 227 Entering Passive Mode (xxxx)
[R] Opening data connection IP: xxxxx 0 PORT: xxxxx
[R] STOR Tuloriad, The — John Ringo & Tom Kratman.mobi
[R] 150 Ok to send data.
[R] 226 File receive OK.
Transferred: Tuloriad, The — John Ringo & Tom Kratman.mobi 569 KB in 5.79 seconds (98.3 KB/s)
[R] MKD /Home/Ebooks/Ringo, John & Taylor, Travis S_
[R] 550 Create folder operation failed.
[R] CWD /Home/Ebooks/Ringo, John & Taylor, Travis S_
[R] 250 Directory successfully changed.
[R] PWD
[R] 257 «/Home/Ebooks/Ringo, John & Taylor, Travis S_/»
[R] TYPE A
[R] 200 Switching to ASCII mode.
[R] PASV
[R] 227 Entering Passive Mode (xxxx)
[R] Opening data connection IP: xxxx PORT: xxxx
[R] LIST -al
[R] 150 Here comes the directory listing.
[R] 226 Directory send OK.
[R] List Complete: 224 bytes in 0.58 seconds (0.4 KB/s)
[R] TYPE I
[R] 200 Switching to Binary mode.
[R] SIZE Claws That Catch — John Ringo & Travis S. Taylor.mobi
[R] 550 Could not get file size.
[R] PASV
[R] 227 Entering Passive Mode (xxxxxxxxxx)
[R] Opening data connection IP: xxxxxxxxxx PORT: xxxx

  • Ошибка could not find the default preferences spore
  • Ошибка coreexception default domain could not be found
  • Ошибка could not find any compatible direct3d devices
  • Ошибка core dll mta
  • Ошибка core dll lineage 2