Windows: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 11: | Line 11: | ||
* Ctrl+C: charm bar | * Ctrl+C: charm bar | ||
* Ctrl+w: search | * Ctrl+w: search | ||
== Use winscp with script or in command line == | |||
* C:\Program Files\WinSCP\winscp.exe" /console /script=YOUR_SCRIPT_FILENAME | |||
Example from http://winscp.net/eng/docs/scripting#example | |||
<pre> | |||
# Automatically abort script on errors | |||
option batch abort | |||
# Disable overwrite confirmations that conflict with the previous | |||
option confirm off | |||
# Connect using a password | |||
# open sftp://user:[email protected] | |||
# Connect | |||
open sftp://[email protected] | |||
# Change remote directory | |||
cd /home/user | |||
# Force binary mode transfer | |||
option transfer binary | |||
# Download file to the local directory d:\ | |||
get examplefile.txt d:\ | |||
# Disconnect | |||
close | |||
# Connect as a different user | |||
open [email protected] | |||
# Change the remote directory | |||
cd /home/user2 | |||
# Upload the file to current working directory | |||
put d:\examplefile.txt | |||
# Disconnect | |||
close | |||
# Exit WinSCP | |||
exit | |||
</pre> | |||
== Find public IP address == | == Find public IP address == |
Revision as of 23:25, 7 January 2013
Access cloud storage
Windows Power Shell
Windows 8
Keyboard shortcut.
- Ctrl+C: charm bar
- Ctrl+w: search
Use winscp with script or in command line
- C:\Program Files\WinSCP\winscp.exe" /console /script=YOUR_SCRIPT_FILENAME
Example from http://winscp.net/eng/docs/scripting#example
# Automatically abort script on errors option batch abort # Disable overwrite confirmations that conflict with the previous option confirm off # Connect using a password # open sftp://user:[email protected] # Connect open sftp://[email protected] # Change remote directory cd /home/user # Force binary mode transfer option transfer binary # Download file to the local directory d:\ get examplefile.txt d:\ # Disconnect close # Connect as a different user open [email protected] # Change the remote directory cd /home/user2 # Upload the file to current working directory put d:\examplefile.txt # Disconnect close # Exit WinSCP exit
Find public IP address
- http://superuser.com/questions/165986/command-prompt-command-for-external-ip
- http://superuser.com/questions/404926/how-to-get-my-external-ip-address-over-nat-from-the-windows-command-line
Create a VB script text file "ip.cbs" with a content like
Option Explicit Dim http : Set http = CreateObject( "MSXML2.ServerXmlHttp" ) http.Open "GET", "http://icanhazip.com", False http.Send Wscript.Echo http.responseText 'or do whatever you want with it Set http = Nothing
Open a command line and run
cscript ip.vbs
The output will look like
C:\Users\mli>cscript ip.vbs Microsoft (R) Windows Script Host Version 5.7 Copyright (C) Microsoft Corporation. All rights reserved. 2601:a:3780:5b:b856:6a09:3ea3:5e26