Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Can't get attributes of file

Can you show us your PowerShell code? I assume you are not passing a full path to Session.GetFileInfo, just a file name.
john523

Can't get attributes of file

I am having issues using the $session.GetFileInfo in powershell, and I keep getting the error "Can't get attributes of file." I am actually trying to download the file. Uploading works fine, but not downloading. Below is the logfile:

Any help would be appreciated.

2015-05-15 17:38:08.322 --------------------------------------------------------------------------
. 2015-05-15 17:38:08.322 WinSCP Version 5.7.2 (Build 5316) (OS 6.1.7601 Service Pack 1 - Windows 7 Professional)
. 2015-05-15 17:38:08.322 Configuration: nul
. 2015-05-15 17:38:08.322 Log level: Normal
. 2015-05-15 17:38:08.323 Time zone: Current: GMT-7 (US Mountain Standard Time), No DST
. 2015-05-15 17:38:08.323 Login time: Friday, May 15, 2015 5:38:08 PM
. 2015-05-15 17:38:08.323 --------------------------------------------------------------------------
. 2015-05-15 17:38:08.323 Script: Retrospectively logging previous script records:
> 2015-05-15 17:38:08.323 Script: option batch on
< 2015-05-15 17:38:08.323 Script: batch on
< 2015-05-15 17:38:08.323 Script: reconnecttime 120
> 2015-05-15 17:38:08.323 Script: option confirm off
< 2015-05-15 17:38:08.323 Script: confirm off
> 2015-05-15 17:38:08.323 Script: option reconnecttime 120
< 2015-05-15 17:38:08.323 Script: reconnecttime 120
> 2015-05-15 17:38:08.323 Script: open ftp://rejuva:***@ftp.jaygroup.com:21 -passive=1 -timeout=15
. 2015-05-15 17:38:08.323 --------------------------------------------------------------------------
. 2015-05-15 17:38:08.323 Session name: (Ad-Hoc site)
. 2015-05-15 17:38:08.323 Host name: (Port: 21)
. 2015-05-15 17:38:08.323 User name: (Password: Yes, Key file: No)
. 2015-05-15 17:38:08.323 Transfer Protocol: FTP
. 2015-05-15 17:38:08.323 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2015-05-15 17:38:08.323 Disable Nagle: No
. 2015-05-15 17:38:08.323 Proxy: none
. 2015-05-15 17:38:08.323 Send buffer: 262144
. 2015-05-15 17:38:08.323 UTF: 2
. 2015-05-15 17:38:08.323 FTP: FTPS: None; Passive: Yes [Force IP: A]; MLSD: A [List all: A]
. 2015-05-15 17:38:08.323 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-05-15 17:38:08.323 Cache directory changes: Yes, Permanent: Yes
. 2015-05-15 17:38:08.323 Timezone offset: 0h 0m
. 2015-05-15 17:38:08.323 --------------------------------------------------------------------------
. 2015-05-15 17:38:08.325 Connecting to ...
. 2015-05-15 17:38:08.435 Connected with . Waiting for welcome message...
< 2015-05-15 17:38:08.533 220 X2 WS_FTP Server 7.0(87395757)
> 2015-05-15 17:38:08.533 USER
< 2015-05-15 17:38:08.643 331 Enter password
> 2015-05-15 17:38:08.643 PASS ********
< 2015-05-15 17:38:09.035 230 User logged in
> 2015-05-15 17:38:09.035 SYST
< 2015-05-15 17:38:09.154 215 UNIX
> 2015-05-15 17:38:09.154 FEAT
< 2015-05-15 17:38:09.262 211-Extensions supported
< 2015-05-15 17:38:09.262 SIZE
< 2015-05-15 17:38:09.262 XMD5
< 2015-05-15 17:38:09.262 XSHA1
< 2015-05-15 17:38:09.262 XSHA256
< 2015-05-15 17:38:09.262 XSHA512
< 2015-05-15 17:38:09.262 XQUOTA
< 2015-05-15 17:38:09.262 LANG EN, ES, FR, GE
< 2015-05-15 17:38:09.262 MDTM
< 2015-05-15 17:38:09.262 MLST size*;type*;perm*;create*;modify*;
< 2015-05-15 17:38:09.262 REST STREAM
< 2015-05-15 17:38:09.262 TVFS
< 2015-05-15 17:38:09.262 UTF8
< 2015-05-15 17:38:09.262 AUTH SSL;TLS-P;
< 2015-05-15 17:38:09.262 PBSZ
< 2015-05-15 17:38:09.262 PROT C;P;
< 2015-05-15 17:38:09.262 211 end
> 2015-05-15 17:38:09.262 OPTS UTF8 ON
< 2015-05-15 17:38:09.357 200 Command OPTS succeed
. 2015-05-15 17:38:09.357 Connected
. 2015-05-15 17:38:09.357 --------------------------------------------------------------------------
. 2015-05-15 17:38:09.357 Using FTP protocol.
. 2015-05-15 17:38:09.358 Doing startup conversation with host.
> 2015-05-15 17:38:09.358 PWD
< 2015-05-15 17:38:09.454 257 "/" is current directory
. 2015-05-15 17:38:09.454 Getting current directory name.
. 2015-05-15 17:38:09.454 Startup conversation with host finished.
< 2015-05-15 17:38:09.455 Script: Active session: [1]
> 2015-05-15 17:38:09.746 Script: pwd
< 2015-05-15 17:38:09.746 Script: /
> 2015-05-15 17:38:09.874 Script: ls -- "/Test/ShipConfirm/"
. 2015-05-15 17:38:09.874 Retrieving directory listing...
> 2015-05-15 17:38:09.874 CWD /Test/ShipConfirm/
< 2015-05-15 17:38:10.025 250 Command CWD succeed
> 2015-05-15 17:38:10.025 PWD
< 2015-05-15 17:38:10.130 257 "/Test/ShipConfirm" is current directory
> 2015-05-15 17:38:10.130 TYPE A
< 2015-05-15 17:38:10.233 200 Transfer mode set to ASCII
> 2015-05-15 17:38:10.233 PASV
< 2015-05-15 17:38:10.349 227 Entering Passive Mode
> 2015-05-15 17:38:10.349 MLSD
. 2015-05-15 17:38:10.349 Connecting to
< 2015-05-15 17:38:10.567 125 Transferring directory
< 2015-05-15 17:38:10.598 226 Transfer completed
. 2015-05-15 17:38:10.603 size=0;type=cdir;create=20150506111215;modify=20150515193636; .
. 2015-05-15 17:38:10.603 size=0;type=pdir;create=20150506111201;modify=20150506111215; ..
. 2015-05-15 17:38:10.603 size=0;type=dir;create=20150515141324;modify=20150515141324; Archived
. 2015-05-15 17:38:10.603 size=12810;type=file;create=20150515123039;modify=20150515123039; Confirm_20150515_122949.TXT
. 2015-05-15 17:38:10.603 size=34366;type=file;create=20150515141345;modify=20150515141347; Confirm_20150515_125002.CSV
. 2015-05-15 17:38:10.603 size=14;type=file;create=20150515193636;modify=20150515193636; test.txt
. 2015-05-15 17:38:10.603 Directory listing successful
. 2015-05-15 17:38:10.603 ..;D;0;1899-12-30T07:00:00.000Z;"" [0];"" [0];---------;0
. 2015-05-15 17:38:10.603 Archived;D;0;2015-05-15T14:13:24.000Z;"" [0];"" [0];---------;0
. 2015-05-15 17:38:10.604 Confirm_20150515_122949.TXT;-;12810;2015-05-15T12:30:39.000Z;"" [0];"" [0];---------;0
. 2015-05-15 17:38:10.604 Confirm_20150515_125002.CSV;-;34366;2015-05-15T14:13:47.000Z;"" [0];"" [0];---------;0
. 2015-05-15 17:38:10.604 test.txt;-;14;2015-05-15T19:36:36.000Z;"" [0];"" [0];---------;0
< 2015-05-15 17:38:10.604 Script: D--------- 0 0 ..
< 2015-05-15 17:38:10.604 Script: D--------- 0 0 May 15 7:13:24 2015 Archived
< 2015-05-15 17:38:10.604 Script: ---------- 0 12810 May 15 5:30:39 2015 Confirm_20150515_122949.TXT
< 2015-05-15 17:38:10.604 Script: ---------- 0 34366 May 15 7:13:47 2015 Confirm_20150515_125002.CSV
< 2015-05-15 17:38:10.604 Script: ---------- 0 14 May 15 12:36:36 2015 test.txt
> 2015-05-15 17:38:10.943 Script: stat -- "test.txt"
. 2015-05-15 17:38:10.943 Listing file "test.txt".
. 2015-05-15 17:38:10.943 Retrieving file information...
> 2015-05-15 17:38:10.943 MLST /test.txt
< 2015-05-15 17:38:11.062 550 Permission denied

. 2015-05-15 17:38:11.062 Could not retrieve file information
< 2015-05-15 17:38:11.062 Script: Can't get attributes of file 'test.txt'.
< 2015-05-15 17:38:11.062 Script: Could not retrieve file information

< 2015-05-15 17:38:11.062 Permission denied
. 2015-05-15 17:38:11.062 Script: Failed
> 2015-05-15 17:38:11.074 Script: exit
. 2015-05-15 17:38:11.074 Script: Exit code: 1
. 2015-05-15 17:38:11.075 Disconnected from server