Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Copying files from one folder to another using Matlab commands

555 views
Skip to first unread message

Dave

unread,
Mar 13, 2006, 1:32:10 PM3/13/06
to
Within my Matlab Current Directory I have arbitrary file:

Temp_txtfile.txt

I want to copy this file to another folder on my HD using a Matlab
script/function:

% Specify the directory to save the files to:
dir = uigetdir('C:\');

% The above command will open a dialog box to navigate to the
relevant folder and allow me to specify the save directory.

The following is a list of what I intend to achieve thereafter:

1) Use another dialog box to select the appropriate file to copy:

e.g

[textfile,pathname] = uigetfile('*.text','Select the Text file');

% I'm not sure if this is correct.

2) Copy the selected file.

3) Paste the selected file to the directory specified in 'dir'.

Thanks.

Dave

PB

unread,
Mar 13, 2006, 1:51:25 PM3/13/06
to

Hi Dave!

Take a look at the function copyfile:

help copyfile

/PB

Michael Wild

unread,
Mar 13, 2006, 2:03:37 PM3/13/06
to

help fullfile
help fileparts
help copyfile


michael

0 new messages