Post a reply

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: MV COMMAND

"full session log file", please!
LICE

MV COMMAND

I am just removing the old 1 and rename %random%.file to 1. Should I try "rename" alias? Could it be the * in the mv command might expect more that one file and I am just rename one file?

script
rm 1 

mv *.file 1
ls
mv *.file 1
mv *.file 1
mv *.file 1
mv *.file 1
mv *.file 1
exit


log
. 2017-04-21 01:31:40.278 Directory listing successful

. 2017-04-21 01:31:40.278 Got reply 1 to the command 2
< 2017-04-21 01:31:40.278 Script: Can't get attributes of file '1'.
< 2017-04-21 01:31:40.278 File or folder '1' does not exist.
. 2017-04-21 01:31:40.278 Script: Failed
. 2017-04-21 01:31:40.278 Session upkeep
. 2017-04-21 01:31:40.278 Script: Exit code: 1
. 2017-04-21 01:31:40.278 Script: Max roundtrip: 0
. 2017-04-21 01:31:40.278 Got reply 1004 to the command 2
. 2017-04-21 01:31:40.278 Disconnected from server
martin

Re: MV COMMAND

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

To generate the session 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.
LICE

MV COMMAND

I have a script with mv to rename a *.file to 1 and it runs fine when I am in the winscp> prompt but when I call a script it fails to rename the file.

cd /remotefolder/

put -filemask=>8K;|>1D; *.bin /remotefolder/
rm 1
mv *.bin 1


Do I need to call the full path?
mv /remotefolder/*.bin /remotefolder/1