 |
|
|
Software > File Transfering > WinSCP >
Using WinSCP: The Basics
Back to Top
Introduction
WinSCP enables you to transfer files safely and securely to and from your
Windows computer and the CUNIX server. WinSCP works seamlessly with Windows
Explorer and your Desktop.
WinSCP also enables you to manage your files and change file properties. You
can also view and edit files using either WinSCP's text file editor or another
editor such as Notepad.
This guide provides instructions on how to use many of WinSCP's basic
functions. For instructions on how to download and install WinSCP, see
Installing WinSCP.
What is Secure FTP?
Secure FTP (File Transfer Protocol) provides a safe and secure (encrypted)
connection for transferring files between your computer and the CUNIX server.
This secure connection reduces the chance that malicious persons will be able
to steal your password and use it to compromise the Columbia University network.
Back to Top
WinSCP Interface Types
WinSCP contains two types of interfaces: the Norton Commander
interface and the Explorer-like interface. Each interface provides
slightly different methods of transferring files to CUNIX, but both enable
you to transfer with the "drag and drop" method. WinSCP enables you to transfer
files directly from Windows Explorer or your Desktop.
Although uses the Norton Commander as the default interface, you can
change the interface at any time.
Below are descriptions and comparisons of each interface.
Norton Commander Interface

The Norton Commander interface is divided into two sections---the Local
Panel and the Remote Panel. The Local Panel, located on the left, contains
the files and directories on your local computer; the Remote Panel, on the
right, contains your files and directories on CUNIX.
Just above the title bar of each panel, you will see a set of icons that
enable you to work with directories. You will also see a drop-down list that
enables you to navigate to other drives or directories, depending on which
panel you're using. You can access a different drive or directory by selecting
the desired drive or directory from the drop-down menu. (Note:
See Working With Files and
Directories for more information.)
Explorer-like Interface

The Explorer-like interface has only one panel, which contains files
and directories for the remote host----in this case, CUNIX----and whose interface
is similar in look and feel to Windows Explorer. Using the Explorer-like
interface, you transfer files to CUNIX using the "drag and drop" method either
from Windows Explorer or from your Desktop.
WinSCP Interface Types Compared
| Norton Commander Interface |
- Displays two panels (one for displaying local host, one for
remote host)
- Keyboard shortcuts
- Drag and drop to and from both panels
- Double-click files to open them
- Default method of selecting files not the same as in Windows Explorer;
(to change to Windows-Explorer method, click Commander and then
select the option Explorer style selection
|
| Explorer-like Interface |
- Displays one panel only (remote directory)
- Keyboard shortcuts
- Drag and drop to and from panel
- Ability to open files
- Ability to edit files on the fly (For HTML and text files, you can
select "Edit"; for Word, the best method is to open the file and then
edit the document.)
- Default method of selecting files same as in Windows Explorer
|
Note: Unless otherwise noted, the procedures in this guide
apply to the Norton Commander Interface.
Switching to Another Interface
- Select Preferences from the Options menu or click the
Preferences icon (
)
- Click the Interface link.
- Select the desired interface by clicking its radio button.

- Click OK.
- Close and then re-open WinSCP for the change to take effect.
Notes:
- You can always switch interfaces at any time.
- If you're switching to the Norton Commander interface, select the
option Explorer style selection from the Commander category in
the Preferences window.
Back to Top
Working With Files and Directories
Switching Between Directories
There are a number of ways you can navigate from one directory to another.
| To do this ... |
Perform the following ... |
| Move to another drive on your local computer |
Select the drive from the drop-down menu |
| Move up one directory level |
Double-click the icon |
| Move down one directory level |
Double-click the directory name |
| Open the contents of a directory |
Double-click the directory name (see also Opening a Directory) |
You can also move quickly between directories by
bookmarking directories you use regularly.
Opening a Directory
- Click the Open Directory icon (
) in the toolbar at the top of the local and
remote host title bars.
- In the Open directory window, type the full path of the directory
you want to open, or click the
button to locate
the directory you want to open.
- Select the directory you want to open in the Browse for Folder window. To
drill down into a directory, double-click that directory name. To select a
directory, click once on the directory name to highlight it. The path of the
directory you selected will be displayed in the Open directory window.

- Click OK. The new directory will be opened.
Note: You can save (bookmark) any directories you access
regularly. For more information, see Bookmarking a Directory.
Back to Top
Bookmarking a Directory
You can save (bookmark) any directory you need to access regularly. This
works the same as bookmarking a URL. Bookmarking a directory makes it easier and
quicker to access directories you use often.
- Click the Open Directory icon (
) in the toolbar at the top of the local and
remote host title bars.
- In the Open directory window, type the full path of the directory
you want to open, or click the
button to locate
the directory you want to open.
- Select the directory you want to open in the Browse for Folder window. To
see the contents of a directory, double-click that directory name. To select
a directory, click once on the directory name to highlight it. The path of the
directory you selected will be displayed in the Open directory window.

- Click Add. The directory path will be displayed in the
Bookmarks area.

- Click OK.
Back to Top
Renaming Files and Directories
Notes:
- You won't be able to rename a directory if:
- The directory is currently bookmarked
- The directory or file is currently open
- Any files or subdirectories in the directory you want to rename are
currently open
- If another instance of the file or directory exists on either the local or remote host, you may want to consider renaming that copy as well in order to avoid any possible confusion.
- In the Local or Remote panel, open the directory where the item you want to
rename is located.
- Select the file you want to rename by selecting Rename from the
Files menu, or by right-clicking on the file and then selecting Rename.
- Enter the new name, and then click the mouse anywhere outside the text field.
Back to Top
Opening a Bookmarked Directory
You can easily access any directory you've bookmarked.
- Click the Open Directory icon (
) in the toolbar at the top of the local and
remote host title bars.
- Select the bookmarked directory you want to open and then click
OK.
Back to Top
Deleting Files and Directories
- In the source panel, open the directory where the item(s) you want to
delete are located.
- Select Delete from the Files menu or or press F8.
- Click OK in the Confirm pop-up window to delete the items, or
click Cancel if you decide you don't want to delete the item(s).
Note: Any files and directories you delete on your local
computer will be moved to your Recycle Bin, so you'll still be able to retrieve
them until you empty the Recycle Bin. However, any items you delete on CUNIX
will be removed permanently.
Back to Top
Transferring Files and Directories
WinSCP enables you to copy of move files and directories to and from your
Windows computer and CUNIX. This procedure covers how to copy files and
directories, but you can also move them. However, you should NOT move your
"mbox" file (your CUNIX inbox); if you do, you won't see see your inbox at all
when you open your mail.
- In the destination panel, open the directory to which you want to transfer
the file(s) or directories.
- In the source panel, open the directory where the file(s) or directories
you want to transfer reside.
- Select the files or directories you want to transfer:
- To select multiple files or directories, click on each file or
folder while holding down the Ctrl key.
- To select a single file or directory, click on that file or
directory once so that it is highlighted.
- Click and drag the selected items to the destination. (If you are using
the Explorer-like interface, drag the items either to your Desktop
or to the desired directory in your Windows Explorer.) The Copy window is displayed.

To display the current default file transfer permissions (as shown below),
click the More button.

- Click Copy. If an older version of any of the items you're transferring
already exists in the destination directory, a confirmation pop-up window will
be displayed. Click Yes to continue, or click No to cancel.

Note: WinSCP assigns default permissions to all files you
transfer to CUNIX. However, you can change the permissions at any time.
Back to Top
Working with Sessions
A session is a permanent profile of your login session that contains many
settings unique to that session. Among the settings you can save in a session
are login information, file and directory permissions and other transfer
settings, bookmarked directories, and interface settings.
Saving a Session
You can create multiple sessions. This can be very helpful if you want to
transfer files to and from different directories and don't want to have to
constantly switch between directories. By simply moving from one session to
another, you'll be able to quickly and easily "switch" between directories.
For example, you may need to transfer files that reside on multiple locations
on your local computer to your public_html directory on CUNIX.
- Select Save Session from the Session menu or click the
Save session icon (
).
- In the Save session as pop-up window, click OK to save the session.

If the session you're saving (such as cunix.cc.columbia.edu) has already
been saved previously, you will be prompted whether you want to overwrite the
existing session. Click Yes to proceed, or click No to cancel.
If you saved the session, the WinSCP Login window will again be displayed,
and the name of your newly created session will be displayed.
Opening a Saved Session
WinSCP enables you to log into any additional sessions you've saved.
- Select from the Open saved session drop-down list the session you want to open.

- Enter your password and then click OK.

Switching Between Open Sessions
If you have multiple sessions open, you can easily switch from one session
to another.
To switch sessions, select the session you want to switch to from the
drop-down list.
Closing a Session
You can log out of WinSCP one session at a time or close all your sessions
and exit the application at once.
You can close any session while still remaining logged into your other
sessions.
- Switch to the session you want to close.
- Click the Close session icon
(
). If you
were logged into more than one session, WinSCP automatically switches to one
of your other active sessions.
Reconnecting to an Expired Session
If you have been logged in to a session for a long time, WinSCP may log you
out automatically for security reasons. You will then need to log in again.
However, you will still be logged in to any other currently open sessions.
- Click Reconnect in the error message displayed.

- Enter your password and then click OK.

Back to Top
WinSCP for Web Publishing
The next two sections cover features especially relevant to web developers:
- Managing File Permissions to make your website publicly visible and to enable sharing file access within your group.
Since secure file transfer will NOT work with the hosts www.columbia.edu and wwwgrp.columbia.edu that set file permissions automatically, you must set the permissions of each file at transfer time or afterwards.
- Setting Default Directories to make uploading to and from the same place easier.
If you have not set up a web page at Columbia yet, see Creating Web Pages at Columbia
Back to Top
Managing File Permissions
What are Permissions?
Each file and directory you transfer from your local computer to CUNIX is
automatically assigned permissions, or levels of access. Although WinSCP sets
file permissions to each file you transfer, you can set the permissions of
individual files either at the time you're transferring a file or after you've
already transferred a file.
Levels of access can be set distinctly for the Owner of the file, the file's Group, and all Others.
Each demographic can be granted Read, Write, and/or eXecute permissions. Someone must have the eXecute
access level to a directory for any kind of access to the files inside it. However, if you change a
directory's permissions, the specific permissions of the files in that directory will remain the same.
If you want to learn more about UNIX file permissions some
information is available in CUIT's
Web Publishing Guide and or sign up for CUIT's free
2-hour UNIX or
Web
Publishing training courses.
How to Set Permissions
While uploading files, if you click the More >>
button in the Copy window, you can set the permissions of the files being uploaded.
However, once the files are uploaded you may need to change a file's
permissions or the unix group for sharing between web developers. WinSCP
supports two protocols and uses SFTP by default. Only the second protocol,
SCP (Secure Copy), allows you to change the
group of remote files. The WinSCP site contains additional information about the two protocols.
To change protocols, open WinSCP and from the Login window highlight cunix.cc.columbia.edu and then click the Load button on the right. From there choose SCP under Protocols. To keep this setting, click Save... and follow the prompts before logging in.
Change the
permissions (and the group with SCP) of remote files in the following way:
- Right-click the file name and choose Properties from the context menu.
- Here you can set the group and, more importantly, set the permissions. For files to be visible from the web, the Others row must have the R checked. Directories must have the X checked--you can check 'Add X to directories' instead, of course. For file sharing, make sure the Group: is set correctly and the W is checked in the Group row.

- Click OK.
Setting Default Permissions
Any permission changes you make before you transfer files will apply to
each file you transfer in that session. So, for example, if you're working
in a session called "My Session", any file you transfer in that session will
be assigned the updated permissions. To make your changes permanent, be sure
you've saved your session.
- Beginning at the Login window when you start WinSCP, click the Preferences option on the left, and then click the Preferences button from the frame on the right. If you are already logged in, select Preferences from the Options menu, or click the
Preferences (
)icon.
- Select the Transfer option on the left.
- In the Transfer preferences window, check Set permissions
in the Upload options section.
- Change the file permissions for Owner, Group, and Others as desired by
clicking the appropriate R (Read), W (Write), and/or X (Execute) check boxes.
Notes:
- If you primarily transfer private files uncheck the R in the Others row.
- If you are maintaining an official site, check the W in the Group row.

- Click OK.
Back to Top
Setting Default Directories
If you always upload and download to and from the same directories, you can configure WinSCP to start your session in the same Remote and/or Local directories.
- Beginning at the Login window when you start WinSCP, highlight your session, for example, cunix.cc.columbia.edu and click the Load button on the right.
- Click the Directories option under Environment on the left.
- Enter the Remote directory field. Web publishers, enter the directory your web site resides; either "/www/data/something/something" or "public_html" for your personal web site.
- Click the
button on the right of the Local directory field and select the directory where you want to begin. Web publishers should select the directory on your computer where you store the site's web files.

- After choosing a Local directory, click Save and follow the prompts.
Back to Top
Setting Preferences
Click the Preferences icon
( ) on the
toolbar to display the configuration options as shown below. Among the options
available are document transfer preferences, permission preferences, and interface
preferences. Just click a category on the left to display its associated options.

To change an option, click the name of that option and then make the
desired selections.
Back to Top
Logging Out of WinSCP
- Select Quit from the Commands menu, or click F10.
- Click OK to proceed, or click Cancel if you don't want to log out.

Back to Top
|
 |
|
 |