FTP panel

Discuss and share scripts and script files...
Post Reply
Walrez
Posts: 29
Joined: 05 May 2008 16:42

FTP panel

Post by Walrez »

Hi,
Based on TheQwerty's idea of creating an html page for a second panel, I played a bit to create a -useless- ftp client.

"FTP : ftp"
input $address, "Server Address:";
open "cmd" /c echo ^<html^> ^<script language="javascript"^>document.location="ftp://$address"^</script^> ^</html^> ><curpath>\ftp.html;
msg "Press Enter to access the requested FTP location";
goto "<curpath>\ftp.html";
#174;

Some notes:

- Instead of using the clipboard to create a new file, which always stops to rename it, I use the command line "echo" statement.

- The msg "Press Enter..." is necessary, otherwise the goto statement is executed before echo has a chance to create the html file, and an error message is displayed (any way to generate a pause?)

- The format for Address would be "username:password@serveraddress"

- The only way to make it a little useful, is to copy the files to upload to the clipboard before executing the query. Then, when the ftp is show, right-click -> paste.
Same for downloading. It's a one time operation, since the preview panel will display another file when click on the main panel.

If there was a setting to "lock" the preview panel, it could probably help. Just an experiment anyway. :wink:

admin
Site Admin
Posts: 66075
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: FTP panel

Post by admin »

Nice experiment! Clever use of cmd echo... :D

Yes, if the Preview could be locked you could even -- clumsily -- work with it.

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: FTP panel

Post by Stefan »

Walrez wrote: (any way to generate a pause?)
Hi, is there an scripting commando like pause, wait or sleep?
Just now i use
while $a <100000 {incr $a};
to wait till my share is mapped before i can goto.

TIA

admin
Site Admin
Posts: 66075
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: FTP panel

Post by admin »

Yes, a non-documented one: wait msecs

example:
wait 1000; //wait 1 second

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: FTP panel

Post by Stefan »

Fine :P Thank you.

Post Reply