Matlab code for uploading images to FTP server
Following is the MATLAB Code for establishing connection with remote FTP Server and uploading image files to this Server.
main_path='C:\Users\Dell\Downloads\TakeVideoTakeVideoframes';mov_path='C:\Users\Dell\Downloads\TakeVideoTakeVideoframes2';if ~exist(mov_path, 'dir') mkdir(mov_path);end;a=dir(main_path);f = ftp('ftp.servername.com','uname','pass');cd(f,'matlab');k = 1;while ~isempty(a)fullfilename = [main_path int2str(k) '.png'];%movfullfname = [mov_path int2str(k) '.png'];disp(fullfilename);x=exist(fullfilename,'file');if x > 0x=1;end;if x temp=0; mput(f,fullfilename ); movefile(fullfilename,mov_path); end; k = k+1; end;
Comments
Post a Comment