Problem with SFTP copies

Jan 21, 2011
20
0
Take Command v25.00.20 x64

I'm not sure if this one is user error or not, but, if so, it seems inconsistent

Following on from my FTP copy problem (my previous post), I tried using SFTP instead. The server is set up support that as well.

TCC seems to add '/*' onto my SFTP path, which then fails

1570613495331.png


I can't work out how to copy an individual file using SFTP

If I use "copy /b "sftp://testuser:testpass@testserver.pscs.co.uk/home/testuser/" then it copies the whole directory contents OK, but that's not what I want to do...
 

rconn

Administrator
Staff member
May 14, 2008
12,345
150
I verified the SFTP issue here; it's a problem with an ipworks api.

TCC tries to determine if the name is a directory, and if so it adds a "/*". The directory test consists of attempting to change the default directory to the specified name and checking the error return. As an extra check, TCC then queries the current directory to see if it matches. The problem with the ipworks dll is that it not only says the directory change to …/file1.dat succeeded, but that the current directory is now …/file1.dat.

The FTP and FTPS apis do not have this problem. I filed a report with ipworks; in the meantime I'm trying to find a workaround for SSH.
 
Jan 21, 2011
20
0
Ah! We're using IPWorks here as well and ran into a similar problem - what we do is the other way around to what you're doing: try to copy the specified file. If that doesn't work, then assume it's a directory and try that.
 

rconn

Administrator
Staff member
May 14, 2008
12,345
150
Pending a permanent fix, you can do something like:

Code:
copy /b "sftp://testuser:testpass@testserver.pscs.co.uk/home/testuser/file1.dat*" z:

TCC knows that if the name has a wildcard it can't be a directory. (Of course, if you have multiple files that match the wildcard spec, you'll get multiple downloads.)
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,461
88
Albuquerque, NM
prospero.unm.edu
Pending a permanent fix, you can do something like:

Code:
copy /b "sftp://testuser:testpass@testserver.pscs.co.uk/home/testuser/file1.dat*" z:

TCC knows that if the name has a wildcard it can't be a directory. (Of course, if you have multiple files that match the wildcard spec, you'll get multiple downloads.)

How about if you
Code:
copy /b "sftp://testuser:testpass@testserver.pscs.co.uk/home/testuser/file1.da[t]" z:

Does your wildcard test recognize that as a wildcard? Or does it only recognize asterisks and question marks?
 
Aug 23, 2010
637
9
Ah! We're using IPWorks here as well and ran into a similar problem - what we do is the other way around to what you're doing: try to copy the specified file. If that doesn't work, then assume it's a directory and try that.
I'd say, that even after ipworks fixes their hickup, this is a more straightforward resolution to the original question of figuring out, if target is a directory.
 
Similar threads
Thread starter Title Forum Replies Date
cgunhouse SFTP Password Problem Support 1
Dick Johnson Weird Color Problem Support 8
fishman@panix.com Problem with 27.15 Support 2
M Problem with VSDevCmd.bat in VS 16.7.3 Support 0
R Problem with @INT[ value] in V26 Support 9
M Selecting test "off by one" problem in Take command Support 4
Alpengreis UTF-8 problem in TCC related to Python Support 7
K_Meinhard Small problem in german IDE 26 Support 3
B Problem with color in nested shells Support 1
Joe Caverly Problem creating and switching to a DESKTOP Support 9
vefatica Another popup problem Support 10
Alpengreis ffind dialog (/W) problem Support 4
Alpengreis [TCMD v25.00.24] Small space problem with the DE translation in Prefs-GUI Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
A Problem with functions @int @decimal and identifying Powershell as a shell. Support 12
B IF command problem in tcexit.btm Support 9
fishman@panix.com Problem at Startup of TCC Support 3
P Problem with FTP copies Support 10
Jay Sage Problem with Context Menu Copy+Paste+Run Key Assignment Support 7
R Problem with %_do_loop in nested do loops Support 2
fishman@panix.com New Problem with later Windows 10 Support 10
Peter Murschall A little problem with LEAVE and COMMENT Support 5
M Handling of %~I problem Support 4
WinLanEm FOR problem Support 18
K Problem With SCRPUT /u Support 3
vefatica What's TCMD's problem with ^e[0m? Support 13
Peter Murschall IDE: RTL with non-English resources-problem is back in Build 28 Support 4
rps Regex problem: \xnn not recognized as a hex character Support 0
rps PRIORITY LOW problem Support 1
old coot Regex problem: \xnn not recognized as a hex character Support 12
vefatica Another problem with build 22. Support 3
Alpengreis [23.x] Download-Problem Support 2
S Problem with " Support 3
C Problem navigating forums Support 11
x13 Problem listing repository files using DIR http(s)://... Support 8
Joe Caverly Problem with TEE in v22 Support 2
Alpengreis Problem with thousands delimiter and colors Support 17
M Take Command 18, migrating to another machine, license problem. Support 1
B TCC 21.01.50 Problem with ALIAS /r and SET /r Support 2
rps How to? @search problem Support 2
WinLanEm @SELECT problem Support 6
T Fixed Problem with use of Batch parameters in the IDE Support 1
Oz Solomon Problem with "list" Support 14
S V21.24 theme problem Support 2
Alpengreis Problem if command prompt is not legacy Support 4
Alpengreis TCMD.INI: The "super hidden" problem ... Support 6
G Odd problem - screen brightness Support 4
rps V20 In-process pipes problem Support 8
Alpengreis Again theme problem [v20.0.21]? Support 11
WinLanEm INPUT problem Support 1

Similar threads