Меню

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

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?


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

180k52 gold badges458 silver badges931 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);
}
}
?>

«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!

Regards,

Alexander

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

vint56


  • #321

bosenok, почитай справку по lzma 7z она есть на русском языке или по фриарку
msrep:l256+lzma:d250m:a1:bt4:fb273:mc10000:lc8

  • #323

bosenok к сожалению универсального метода сжатия под все типы файлов не бывает.

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

лучший способ для меня — это быстрое сжатие и скорость установки!

-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8 (высокая скорость/распаковка и приемлемое сжатие)
-mprecomp+srep+lzma:200mb:normal:bt4:273:mc10000:lc8 (медленная скорость/распаковка и хорошее сжатие, если precomp нашел zlib потоки и смог их расжать)

т.к. у меня на PC мало RAM всего 4Gb особо со словарем для LZMA и SREP не разгуляешься, поэтому, если у тебя много оперативной памяти, можешь попробовать увеличить словарь для LZMA это опция d158m и для SREP, но учти, что нужны другие версии LZMA-x64 и SREP64

Код:

[External compressor:lzma]
header = 0
packcmd   = FreeArc-LZMA-x64 e lzma{:option} $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd = FreeArc-LZMA-x64 d lzma{:option} $$arcpackedfile$$.tmp $$arcdatafile$$.tmp

[External compressor:srep]
header = 0
packcmd   = srep64 -m5f -l512 -c256 -a1 $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd = srep64 -d -s $$arcpackedfile$$.tmp $$arcdatafile$$.tmp

по расходу RAM на сжатие, выставляй по такому принципу, если на распаковку задаешь d200m, то при сжатии получиться примерно в 10,5 раз больше (около 2100 Mb)

-msrep:l256+lzma:d250m:a1:bt4:fb128:mc10000 «Setup.arc» «New*» и всё стало нормально

почему не стал пробовать precomp ?

Последнее редактирование: 22 Мар 2015

sergey3695


  • #326

Hi,

My problem is precomp when decompressing.

arc.ini:

Код:

[External compressor:precomp]
header = 0
packcmd   = precomp -intense -c-  {options} -o$$arcpackedfile$$.tmp  $$arcdatafile$$.tmp
unpackcmd = precomp -o$$arcdatafile$$.tmp -r $$arcpackedfile$$.tmp

compress:

Код:

arc a -ep1 -r -ed -lc512 -ld512 -mt1 -mprecomp+delta+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8 "C:packtest.arc" "C:packtest*"


100.00% - New size: 1033857462 instead of 1760634392


Done.
Time: 15 minutes, 45 seconds


Recompressed streams: 3894/6964
GZip streams: 0/6
PNG streams: 53/227
PNG streams (multi): 50/63
zLib streams (intense mode): 3791/6668


You can speed up Precomp for THIS FILE with these parameters:
-zl38,64,68,98 -d0


Errorlevel=0
Compressed 1 file, 1,760,634,392 => 1,044,793,889 bytes. Ratio 59.34%
Compression time: cpu 400.69 sec/real 1354.96 sec = 30%. Speed 1.30 mB/s
All OK

decompress with unarc.exe:

Код:

unarc.exe x -dpunpacked test.arc

result:
ERROR: file unpackedtscex15V1.cpk failed CRC check

decompress with arc.exe:

Код:

arc.exe x -dpunpacked test.arc

result:
arc.exe: wclose: invalid argument (Bad file descriptor)
ERROR: CRC failed in "unpackedtscex15V1.cpk". File is broken.

I use a different version of Precomp (0.38, 0.40, 0.41, 0.42, 0.43), but same problem.

I changed switch of Precomp:
precomp -intense -c- -t-j
precomp -intense -t-j
precomp -intense
precomp -intense -mjpeg- -t- -c-

result: CRC error

and last switch:
precomp -c-

result: no CRC error

This CRC problem occurs when some files in -intense mode.

What is the problem?

Thanks.

vint56


  • #328

thanks, i tested but same problem.

This problem occurs in some file.

pack new

Код:

PrecompInside0.31pack>arc.exe a -ep1 -dses --dirs -s; -lc- -di -i2 -r -mprecomp+delta+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8 data.arc packeddata*

FreeArc 0.67 (December 12 2012) Creating archive: data.arc using precomp+delta+lzma:158mb:normal:bt4:273:mc1000:lc8
Memory for compression 1645mb, decompression 158mb, cache 1mb
Compressing 1 file, 832,618,624 bytes
  Compressing dt15_win.cpk
Compressing 832,618,624 bytes with precomp -intense -cn -t-j  -o$$arcpackedfile$$.tmp  $$arcdatafile$$.tmp

Precomp v0.4.3 - ALPHA version - USE FOR TESTING ONLY
Free for non-commercial use - Copyright 2006-2012 by Christian Schneider

Input file: $$arcdatafile$$.tmp
Output file: $$arcpackedfile$$.tmp

Using packjpg25.dll for JPG recompression.
--> packJPG library v2.5a (12/12/2011) by Matthias Stirner / Se <--More about PackJPG here: http://www.elektronik.htw-aalen.de/packjpg

100.00% - New size: 1093053297 instead of 832618624

Done.
Time: 1 minute(s), 43 second(s)

Recompressed streams: 2327/2549
GZip streams: 0/1
PNG streams: 1234/1251
PNG streams (multi): 894/896
zLib streams (intense mode): 199/401

You can speed up Precomp for THIS FILE with these parameters:
-zl63,64,65,66,67,68,69,98 -d0

Errorlevel=0

Compressed 1 file, 832,618,624 => 129,022,572 bytes. Ratio 15.4%
Compression time: cpu 739.10 secs, real 586.11 secs. Speed 1,421 kB/s
All OK

unpack

Код:

PrecompInside0.31unpack>unarc.exe x -w. -dpunpacked data.arc

FreeArc 0.67 unpacker. Extracting archive: data.arc
Extracting dt15_win.cpk (832618624 bytes)

ERROR: file unpackeddt15_win.cpk failed CRC check

pack

Код:

PrecompInside0.31pack>arc.exe a -ep1 -dses --di
rs -s; -lc- -di -i2 -r -mprecomp+delta+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8 data.arc packeddata*
FreeArc 0.67 (December 12 2012) Creating archive: data.arc using precomp+delta+lzma:158mb:normal:bt4:273:mc1000:lc8
Memory for compression 1645mb, decompression 158mb, cache 1mb
Compressing 1 file, 832,618,624 bytes
  Compressing dt15_win.cpk                                                8%
Compressing 832,618,624 bytes with precomp -intense -cn -t-j  -o$$arcpackedfile$$.tmp  $$arcdatafile$$.tmp

Precomp v0.4.3 - ALPHA version - USE FOR TESTING ONLY
Free for non-commercial use - Copyright 2006-2012 by Christian Schneider

Input file: $$arcdatafile$$.tmp
Output file: $$arcpackedfile$$.tmp

Using packjpg25.dll for JPG recompression.
--> packJPG library v2.5a (12/12/2011) by Matthias Stirner / Se <--More about PackJPG here: http://www.elektronik.htw-aalen.de/packjpg

100.00% - New size: 1093053297 instead of 832618624

Done.
Time: 1 minute(s), 44 second(s)

Recompressed streams: 2327/2549
GZip streams: 0/1
PNG streams: 1234/1251
PNG streams (multi): 894/896
zLib streams (intense mode): 199/401

You can speed up Precomp for THIS FILE with these parameters:
-zl63,64,65,66,67,68,69,98 -d0

Errorlevel=0

Compressed 1 file, 832,618,624 => 129,022,572 bytes. Ratio 15.4%
Compression time: cpu 732.58 secs, real 573.55 secs. Speed 1,452 kB/s

unpack

Код:

C:Userswin7_testDesktoptempPrecompInside0.31unpack>unarc.exe x -w. -dpunpacked data.arc
FreeArc 0.67 unpacker. Extracting archive: data.arc
Extracting dt15_win.cpk (832618624 bytes)

ERROR: file unpackeddt15_win.cpk failed CRC check

ps: ram not problem (%100)

I tested only precomp (with CRC error file: dt15_win.cpk)

pack

Код:

precomp -cn -t-j dt15_win.cpk

Precomp v0.4.3 - ALPHA version - USE FOR TESTING ONLY
Free for non-commercial use - Copyright 2006-2012 by Christian Schneider

Input file: dt15_win.cpk
Output file: dt15_win.pcf

Using packjpg25.dll for JPG recompression.
--> packJPG library v2.5a (12/12/2011) by Matthias Stirner / Se <--More about PackJPG here: http://www.elektronik.htw-aalen.de/packjpg

100.00% - New size: 1061104963 instead of 832618624

Done.
Time: 55 second(s), 630 millisecond(s)

Recompressed streams: 2128/2148
GZip streams: 0/1
PNG streams: 1234/1251
PNG streams (multi): 894/896

You can speed up Precomp for THIS FILE with these parameters:
-zl63,64,65,66,67,68,69 -d0

unpack

Код:

precomp  -r dt15_win.pcf

Precomp v0.4.3 - ALPHA version - USE FOR TESTING ONLY
Free for non-commercial use - Copyright 2006-2012 by Christian Schneider

Input file: dt15_win.pcf
Output file: dt15_win.cpk

Using packjpg25.dll for JPG recompression.
--> packJPG library v2.5a (12/12/2011) by Matthias Stirner / Se <--
More about PackJPG here: http://www.elektronik.htw-aalen.de/packjpg

100.00% |

Done.
Time: 1 minute(s), 16 second(s)

Original file size: 832.618.624
PCF file size: 1.061.104.963

Unpacked file size: 5.127.585.932

Uh? Original and unpacked file size is different.

I think problem is precomp occurs error in some file.

Thanks.

Последнее редактирование: 23 Сен 2015

  • #329

Problem is PNG compress of precomp. Need to disable PNG compress.

Disable JPEG (j) and PNG (n):

precomp -intense -cn -t-jn

No CRC error, i think this bug of precomp. (in some files)

Thanks.

vint56


  • #330

tanerjames, disable PNG

Код:

[External compressor:precomp]
header = 0
packcmd   = precomp -slow -t-n -o$$arcpackedfile$$.tmp  $$arcdatafile$$.tmp
unpackcmd = precomp -o$$arcdatafile$$.tmp -r $$arcpackedfile$$.tmp

  • #331

tanerjames, disable PNG

Код:

[External compressor:precomp]
header = 0
packcmd   = precomp -slow -t-n -o$$arcpackedfile$$.tmp  $$arcdatafile$$.tmp
unpackcmd = precomp -o$$arcdatafile$$.tmp -r $$arcpackedfile$$.tmp

Disable to PNG & JPEG compress (just in case)

Thank you.

  • #332

Здравствуйте, у меня следующая проблема с precompinside 0.31. При распаковке созданных им архивов им же, мне выдает ошибки «Could not get file size of file null00» и после некоторого промежутка времени «Injecting code in process was not complete». Никакие настройки я не менял, дллку не инжектил, использовал только то, что было в архиве. Но при распаковке версией 0.30 подобных проблем не наблюдается.

  • #333

bosenok к сожалению универсального метода сжатия под все типы файлов не бывает.

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

лучший способ для меня — это быстрое сжатие и скорость установки!

-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8 (высокая скорость/распаковка и приемлемое сжатие)
-mprecomp+srep+lzma:200mb:normal:bt4:273:mc10000:lc8 (медленная скорость/распаковка и хорошее сжатие, если precomp нашел zlib потоки и смог их расжать)

т.к. у меня на PC мало RAM всего 4Gb особо со словарем для LZMA и SREP не разгуляешься, поэтому, если у тебя много оперативной памяти, можешь попробовать увеличить словарь для LZMA это опция d158m и для SREP, но учти, что нужны другие версии LZMA-x64 и SREP64

Код:

[External compressor:lzma]
header = 0
packcmd   = FreeArc-LZMA-x64 e lzma{:option} $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd = FreeArc-LZMA-x64 d lzma{:option} $$arcpackedfile$$.tmp $$arcdatafile$$.tmp

[External compressor:srep]
header = 0
packcmd   = srep64 -m5f -l512 -c256 -a1 $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd = srep64 -d -s $$arcpackedfile$$.tmp $$arcdatafile$$.tmp

по расходу RAM на сжатие, выставляй по такому принципу, если на распаковку задаешь d200m, то при сжатии получиться примерно в 10,5 раз больше (около 2100 Mb)

почему не стал пробовать precomp ?

подскажите как добавить сюда precomp?

  • #334

подскажите как добавить сюда precomp?

необходимо добавить в свой arc.ini секцию для алгоритма прекомпрессинга (пример для precomp 0.43)

Код:

[External compressor:precomp]
header = 0
packcmd   = precomp -cn -intense0 -t-j {options} -o$$arcpackedfile$$.tmp  $$arcdatafile$$.tmp
unpackcmd = precomp -o$$arcdatafile$$.tmp -r $$arcpackedfile$$.tmp

опции:
-cn выключает дефолтное сжатие bZip2
-t-j игнорирует детект jpg файлов
-intense0 поиск raw заголовков zLib без рекурсий

в методе сжатия достаточно указать -mprecomp+lzma:158mb:normal:bt4:128:mc1000:lc8

  • 356.2 KB
    Просмотры: 60

  • 439 KB
    Просмотры: 52

  • #335

У меня вылетает ошибка Can’t open PrecompInside events, и через несколько секунд injecting code in process was not completed

vint56


  • #336

L-e-o-N, PrecompInside0.31 там есть inject скинь precomp.exe в папку и запусти батник и после возьми precomp.exe и используй для сжатия и распаковки

  • #337

L-e-o-N, PrecompInside0.31 там есть inject скинь precomp.exe в папку и запусти батник и после возьми precomp.exe и используй для сжатия и распаковки

я так и делал

vint56


  • #338

L-e-o-N, а в скрипт закинул для распаковки

  • #339

L-e-o-N, а в скрипт закинул для распаковки

да при этом в консоле пишет ERROR: Could not get file size of file null00,
попробывал еще раз теперь первого окна с ошибкой нет, остальное также

vint56


  • #340

скинь свой PrecompInside которым ты сжимаеш

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Ошибка could not get debug privilege are you admin
  • Ошибка cod4 patchv2 ff is different from server