How to replace trailing character

Advertisement

dcatcha
Guest

How to replace trailing character

I am trying to download\copy some Linux Dir to a windows box, and any file\object in a Linux directory that has "RandomName@" errors in the SCP copy. It is not a folder, and I have root access... my thought is on the copy to download and change the trailing"@" to "01a", so they can be identified after the copy is done. Additionally, I am running this as a background process which the guide says it won't prompt for errors, but I find my self clicking "OK" all day long.

I looked at the grep custom search command, but it I don't see\know how to set a pattern where last character is "@" replace with [01a]


Thanks...

Reply with quote

Advertisement

dcatcha
Guest

More info

Sorry, I guess I forgot to mention -
I am connecting via SCP, as root
I am using v 5.5.6.0 Modified date 10/16/2014

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,317
Location:
Prague, Czechia

Re: How to replace trailing character

I cannot reproduce your problem.

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

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. 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.

_________________
Martin Prikryl

Reply with quote

Guest

Re: How to replace trailing character

martin wrote:

I cannot reproduce your problem.

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

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. 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.

Here is the error, see attached image. I will work on getting a log uploaded. In regards to the version, it looks like I am current.

Description: Screenshot showing failed then looking in the dir you see the file.

EXAMPLE_ERROR.PNG

Reply with quote

dcatcha
Guest

Re: How to replace trailing character

martin wrote:

I cannot reproduce your problem.

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

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. 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.

Here is a log and screenshot to go with it.

Description: this corresponds with the log.

to go with log.PNG

  • log.txt (81.68 KB, Private file)
Description: Here is the log to go with the pic.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,317
Location:
Prague, Czechia

Re: How to replace trailing character

If you cannot work with the file in shell, it's unlikely you can work with it in WinSCP with SCP protocol. Did you try SFTP?

Reply with quote

Guest

Re: How to replace trailing character

martin wrote:

If you cannot work with the file in shell, it's unlikely you can work with it in WinSCP with SCP protocol. Did you try SFTP?

No, I have not tried SFTP yet.
It works, sort of... Isn't there a way to copy\rename on the fly, or exclude "randomnamerandomlength@" so if ends with "@" don't copy or replace it with a valid character?
Why do I get prompted to click OK, at least if that didn't happen I could let the copy run.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,317
Location:
Prague, Czechia

Re: How to replace trailing character

Isn't there a way to copy\rename on the fly, or exclude "randomnamerandomlength@" so if ends with "@" don't copy or replace it with a valid character?
The problem is about inability to access the remote file, not about an inability to save the file locally with "@" at the end. So there's nothing to rename.
You can exclude them though. Use file mask *@.
See https://winscp.net/eng/docs/file_mask

Why do I get prompted to click OK, at least if that didn't happen I could let the copy run.
Well, because an error occurred. Usually, you want to know that.
_________________
Martin Prikryl

Reply with quote

Guest

Re: How to replace trailing character

martin wrote:

Isn't there a way to copy\rename on the fly, or exclude "randomnamerandomlength@" so if ends with "@" don't copy or replace it with a valid character?
The problem is about inability to access the remote file, not about an inability to save the file locally with "@" at the end. So there's nothing to rename.
You can exclude them though. Use file mask *@.
See https://winscp.net/eng/docs/file_mask

Why do I get prompted to click OK, at least if that didn't happen I could let the copy run.
Well, because an error occurred. Usually, you want to know that.

Should the checkbox "No confirmation for transfers" negate the warning? If not, Is there a way to stop them from showing up?

Reply with quote

Advertisement

Guest

Re: How to replace trailing character

I have tried the mask of "| *@" & "*@". "*@" places this in include files, and "| *@" is exclude - In both cases I also check the box for newer files and I still get the error on file transfer.

Reply with quote

Guest

Re: How to replace trailing character

I tried SFTP and get the same errors with transfers, any file with "randomname@".

Reply with quote

Guest

Re: How to replace trailing character

martin wrote:

Isn't there a way to copy\rename on the fly, or exclude "randomnamerandomlength@" so if ends with "@" don't copy or replace it with a valid character?
The problem is about inability to access the remote file, not about an inability to save the file locally with "@" at the end. So there's nothing to rename.
You can exclude them though. Use file mask *@.
See https://winscp.net/eng/docs/file_mask

Why do I get prompted to click OK, at least if that didn't happen I could let the copy run.
Well, because an error occurred. Usually, you want to know that.

I have tried the mask of "| *@" & "*@". "*@" places this in include files, and "| *@" is exclude - In both cases I also check the box for newer files and I still get the error on file transfer. Any thoughts as to why the filter does not exclude that file?

I also tried connecting with the SFTP connection and I get the errors on the same files with the exclude filter being applied |*@


Yes, I agree you may want to know but also in some cases as mine you just want the bulk of the data, and take a second pass after reviewing some logs.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,317
Location:
Prague, Czechia

Re: How to replace trailing character

Should the checkbox "No confirmation for transfers" negate the warning? If not, Is there a way to stop them from showing up?
It's not a confirmation. It's an error.
_________________
Martin Prikryl

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,317
Location:
Prague, Czechia

Re: How to replace trailing character

Anonymous wrote:

I have tried the mask of "| *@" & "*@". "*@" places this in include files, and "| *@" is exclude - In both cases I also check the box for newer files and I still get the error on file transfer.
Please attach a full log file showing the problem (using the latest version of WinSCP) using file mask "| *@".

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. 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.

_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum