Both solutions work
Both suggestions worked independently, but the wildcard solution is very useful and a great idea.
TY
TY
mv
commands:
option batch continue
option batch abort
mv [t]imelapse5.mp4 timelapse6.mp4
mv [t]imelapse4.mp4 timelapse5.mp4
mv [t]imelapse3.mp4 timelapse4.mp4
mv
with mask does not fail, if the mask does not match any file.
d:\timelapse\timelapse_temp.mp4
) and I run a script to rename the files on the server, upload the new file, and then rename it to the current displayed on the website (timelapse.mp4
).
mv
instead of rename
, same issue.
open ftp://inbound@[domain].net:[password]@ftp.[domain].net
cd /working/weather
mv timelapse5.mp4 timelapse6.mp4
mv timelapse4.mp4 timelapse5.mp4
mv timelapse3.mp4 timelapse4.mp4
mv timelapse2.mp4timelapse3.mp4
mv timelapse1.mp4 timelapse2.mp4
mv timelapse.mp4 timelapse1.mp4
put d:\timelapse\timelapse_temp.mp4 /working/weather/
mv timelapse_temp.mp4 timelapse.mp4
close
exit
. 2024-04-05 09:21:45.081 Connected
. 2024-04-05 09:21:45.081 --------------------------------------------------------------------------
. 2024-04-05 09:21:45.081 Using FTP protocol.
. 2024-04-05 09:21:45.081 Doing startup conversation with host.
> 2024-04-05 09:21:45.081 PWD
< 2024-04-05 09:21:45.109 257 "/" is your current location
. 2024-04-05 09:21:45.109 Getting current directory name.
. 2024-04-05 09:21:45.109 Startup conversation with host finished.
< 2024-04-05 09:21:45.110 Script: Active session: [1] inbound@[domain].net@ftp.[domain].net
> 2024-04-05 09:21:45.110 Script: cd /working/weather
. 2024-04-05 09:21:45.110 Cached directory change via "/working/weather" to "/working/weather".
. 2024-04-05 09:21:45.110 Getting current directory name.
< 2024-04-05 09:21:45.110 Script: /working/weather
> 2024-04-05 09:21:45.111 Script: rename timelapse5.mp4 timelapse6.mp4
. 2024-04-05 09:21:45.111 Listing file "timelapse5.mp4".
. 2024-04-05 09:21:45.111 Retrieving file information...
> 2024-04-05 09:21:45.111 MLST /working/weather/timelapse5.mp4
< 2024-04-05 09:21:45.139 550 Can't check for file existence
. 2024-04-05 09:21:45.139 Could not retrieve file information
< 2024-04-05 09:21:45.139 Script: Can't get attributes of file 'timelapse5.mp4'.
< 2024-04-05 09:21:45.139 Could not retrieve file information
< 2024-04-05 09:21:45.139 Can't check for file existence
. 2024-04-05 09:21:45.140 Script: Failed
. 2024-04-05 09:21:45.140 Script: Exit code: 1
. 2024-04-05 09:21:45.143 Disconnected from server