Save a copy of current file to FTP

Help with writing and playing macros

Save a copy of current file to FTP

Postby AndrewRansom » Fri Nov 24, 2006 12:08 am

Hi,

I'm looking for advice on creating a macro that will let me save a copy of the file I'm currently working on to an FTP site. I like to maintain both a local and remote version of some of my files, and this would help streamline that process for online updates. Some details:

- Constant server/login
- Constant 'home' remote folder (eg: /aaa/bbb/)
- local and remote filenames would be the same (eg: filename.txt)
- detect parent folder name(eg 'c:\ddd\ccc') and save to remote site:
eg: /aaa/bbb/ccc/filename.txt

Is this even possible? :)

Thanks in advance,
Andrew
User avatar
AndrewRansom
Newbie
 
Posts: 1
Joined: Thu May 25, 2006 11:00 pm

Re: Save a copy of current file to FTP

Postby Bego » Fri Nov 24, 2006 8:21 am

Why don't you write an "ftp-batch" and let it run like this:

ftp -s:MYFTPCONFIG.FTP

Here is how MYFTPCONFIG.FTP looks like:
Code: Select all
open YOURSERVERNAME
YOURUSERNAME
YOURPASSWORD
ascii
cd /aaa/bbb
lcd c:\temp\whatever
put yourfile.txt
put yourSecondFile.whatever
bye


Sure you can bind that to a tool and run it from UE.

Disadvantage: afaik "copy *" does not work, you have to specify exact filenames.

hth Bego
User avatar
Bego
Master
Master
 
Posts: 357
Joined: Wed Nov 24, 2004 12:00 am
Location: Germany


Return to Macros