Problem with LS command

jdoe13169_at_yahoo.com
Date: 12/17/04


Date: 17 Dec 2004 07:54:27 -0800

I have batch files setup to move data to and from a server using SFTP.
My batch files run the SFTP command and use a script (sftp [-b
batchfile]) to pull or push the file and also issue an LS command
before or after to verify that the file was available or made it over
to the server. I capture this output to a log file to review in case of
problems. This process works fine.

The problem I am having is that the LS command returns such a long
listing. It is difficult to find the file. I have tried to limit the
output by sending the LS command in my script like this but I get the
error message below.

sftp> LS somefile.txt
Can't ls: "/dir1/dir2/somefile.txt" is not a directory

When I issue the same command interactively in an SFTP session the
command works fine. It just fails when run within a script.

Some background, I am using OpenSHH client on Windows and connecting to
a V-Shell server on Windows.

Any help would be greatly appreciated.



Relevant Pages

  • Re: FTP delete problem
    ... But i have wrote that manually the delete command it's OK!!! ... Dim strLocalFolderName, strFTPServerName, strLoginID ... In my script I use the options -s for the file. ... If i am in session in the server the scheduled script result OK. ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: FTP in ASP.NET C#
    ... It has native .NET classes that will allow you to use the FTP protocol. ... >I would like to have my application FTP a file to a server after a user ... > ' This script assumes the file to be FTP'ed is in the same directory as ... > ' If there are multiple files to put, we need to use the command ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: WinSCP
    ... Howto Setup a chroot jail for ssh / scp / sftp with Linux ... WinSCP is connecting well as root user or any other. ... Is the host running a SFTP server? ... Sound like the sftp subsystem settings in your script are not the same ...
    (comp.os.linux.networking)
  • Re: replace field contents - record locking
    ... (windows, server 8, clients 8.5) ... If a user is in a record, then it is locked, and the replace command ... You can script navigation to force a record commit. ... successive editions of Filemaker have been successively slower. ...
    (comp.databases.filemaker)
  • Re: Perl and IIS - script runs but The page cannot be displayed
    ... > one with the variables passed to the script hard coded (although there ... > with absolute paths rather the relative ones the server doesnt mind. ... When executed from a command line, ... CGI programs do not use this function, ...
    (comp.lang.perl.misc)