Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 6:28 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Reading and writing files to a server
PostPosted: August 8th, 2009, 1:33 am 
Offline

Joined: March 27th, 2006, 9:44 pm
Posts: 5
Location: Bournemouth
Hi, hoping someone can help. I want to create a program where I can open a file from a web server and also copy a file from my computer to the web server. I have been trying to get opus to open/save a file in the style of ftp://username:password@domain.com/data/filename.txt

I tried different actions such as 'copy to', 'write text to', 'launch program' and 'launch url' but nothing seems to work.

I need the program to save the file to the server without it prompting for the ftp user name or password. If I copy and paste the ftp path in the style above into a windows address bar I can open an existing file on the server without any problem but I can't seem to get opus to do it at all. I've contacted my hosting company and they have checked the server has the necessary read/write permissions and it can have an annonymous log on.

I seem to remember when I have used scripts before it said to use a double \ instead of single one in certain instances (e.g. c:\\document.doc) so I wonder if there is something wrong with the number and/or type of slashes I am using? I also seem to remember about using speech marks around the path also but again this may not be relevant in this instance.

Your thoughts would be much appreciated and would save a lot of further head scratching,

Thanks in advance

Nick

_________________
Nick
Bournemouth


Top
 Profile  
 
 Post subject:
PostPosted: August 8th, 2009, 3:25 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
You might need to use something like wget.

See

viewtopic.php?t=3385&highlight=wget

Paul


Last edited by Paul on August 8th, 2009, 12:16 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: August 8th, 2009, 11:07 am 
Offline

Joined: April 1st, 2005, 6:59 pm
Posts: 98
Location: Maastricht, The Netherlands
Opus: V7
OS: Mac OS X 10.7.2 | Windows 8 Dev
System: i5 2.7 | 8G Ram | 1 T HD
Try this with the buildin ftp command from windows can be found in system32 directory.
Code:
ftp -s:script.txt ftp.server.com


The contents of script.txt might look like this:
Code:
yourUserName
yourPassword
bin
cd /files
get file.zip
bye

This is handy for administration between servers, but keep in mind that FTP sends passwords in clear text, so you need to clear this.

Regards,

Ronnie


Top
 Profile Visit website  
 
 Post subject: Thanks
PostPosted: August 8th, 2009, 4:07 pm 
Offline

Joined: March 27th, 2006, 9:44 pm
Posts: 5
Location: Bournemouth
Thanks for your replies.

Ronnie, your idea sounds good but could you do me a favour and explain your method in some step by step details of what I would need to do as I am a little unsure.

Your help is much appreciated

Best regards

Nick

_________________
Nick
Bournemouth


Top
 Profile  
 
 Post subject:
PostPosted: August 9th, 2009, 10:03 am 
Offline

Joined: April 1st, 2005, 6:59 pm
Posts: 98
Location: Maastricht, The Netherlands
Opus: V7
OS: Mac OS X 10.7.2 | Windows 8 Dev
System: i5 2.7 | 8G Ram | 1 T HD
First make the textfile with your data:

Code:
myPath ="username"+"\n"+"password"+
"\n"
+"bin"+
"\n"+"cd imagesl"+//here you can change to any directory//
"\n"+"pasive"
+"\n"+"get "+''here the file to download"//
+"\n"+"bye"


Then with a write to disk file trigger action write the variable myPath to the destination for example <SYSTEM_PUBLICATION_DIR>\script.txt

Next step is to make a trigger with launch action:
1. browse for ftp.exe in the system32 folder.
2. option will be ; -s:script.txt ftp.yourwebsite.com
3. file will be found in <SYSTEM_PUBLICATION_DIR>\script.txt


Hope this helps

Ronnie


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group