Go Back   FlashFXP Forums > >

General Discussion Need help? Have a problem? Let us help you. Bug reports and feature requests should be made using the Bug Tracker or Feature Tracker

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 09-22-2015, 10:34 PM   #1
mitch
Junior Member
FlashFXP Registered User
 
Join Date: Jan 2006
Posts: 20
Default Script to upload screenshot to ftp with Greenshot

Hello,

Here is a link to what i need to achieve with Flashfxp as the mediator.

In the following example its done with WinSCP but of course we are users of flashfxp so i want to achieve something similar if possible ?

How to Upload Screenshots to a Web Server via FTP, SCP or SFTP | Greenshot

Can it be done, anyone give some clear instructions on how to acheive this... will transfer $5 to a nominated paypal for your time. Cheers.
mitch is offline  
Old 09-23-2015, 08:50 AM   #2
MxxCon
Super Duper
FlashFXP Beta Tester
 
Join Date: Oct 2001
Location: Brooklyn, NY
Posts: 3,881
Default

Have you looked at FlashFXP's help file, command line section?
__________________
[Sig removed by Administrator: Signature can not exceed 20GB]
MxxCon is offline  
Old 09-23-2015, 07:36 PM   #3
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Command:
Code:
<path\to\>flashfxp.exe
Argument:
Code:
/tray /overwrite /upload <server name> /localpath="{0}" /remotepath="<path\to\target>file.png" /quit
replace <server name> with the name of the server, if the server is within a group then include the group name such as \group 1\group 2\site name

replace <path\to\target>file.png with the desired target location for the uploaded screenshot

The above command will start FlashFXP minimized to the tray, (overwrite the file if it already exists) upload the file, and then quit.
bigstar is offline  
Old 09-24-2015, 08:14 AM   #4
mitch
Junior Member
FlashFXP Registered User
 
Join Date: Jan 2006
Posts: 20
Default

Quote:
Originally Posted by bigstar View Post
Command:
Code:
<path\to\>flashfxp.exe
Argument:
Code:
/tray /overwrite /upload <server name> /localpath="{0}" /remotepath="<path\to\target>file.png" /quit
replace <server name> with the name of the server, if the server is within a group then include the group name such as \group 1\group 2\site name

replace <path\to\target>file.png with the desired target location for the uploaded screenshot

The above command will start FlashFXP minimized to the tray, (overwrite the file if it already exists) upload the file, and then quit.
Hello, i sort of got this working, however if my site name has credentials for the ftp, does <site name> inherit the user and pass and i dont need to pass it across in the command line ?
mitch is offline  
Old 09-24-2015, 09:24 AM   #5
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Yes, <server name> is the name of the server within the FlashFXP Site Manager.
bigstar is offline  
Old 09-24-2015, 06:30 PM   #6
mitch
Junior Member
FlashFXP Registered User
 
Join Date: Jan 2006
Posts: 20
Default

Quote:
Originally Posted by bigstar View Post
Yes, <server name> is the name of the server within the FlashFXP Site Manager.
This is the argument i have.

/tray /overwrite /upload menkom /localpath="{0}" /remotepath="" /quit

i get an error message in flashfxp when it starts with the following.

It seems when i use the sitename as specified in the sitename field of the site manager it gives an error. But if i use something like ftp.menkom.com.au it attempts to connect but says i need to authenticate.... ???

http://i.imgur.com/SGdWgK0.jpg
mitch is offline  
Old 09-24-2015, 09:17 PM   #7
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Quote:
/tray /overwrite /upload menkom /localpath="{0}" /remotepath="" /quit
That's not going to work, you need to set the /remotepath to the target path\filename
bigstar is offline  
Old 09-24-2015, 09:28 PM   #8
mitch
Junior Member
FlashFXP Registered User
 
Join Date: Jan 2006
Posts: 20
Default

Ok still got issues.. this is everything i have and the errors... i just want to upload to the the public_html folder.

http://i.imgur.com/0N8D6vW.jpg

http://i.imgur.com/tmWYn16.jpg

Argument: /tray /overwrite /upload menkom /localpath="{0}" /remotepath="\test.png" /quit
mitch is offline  
Old 09-25-2015, 10:01 AM   #9
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Ok do this..

Open the Site Manager and select menkom in the Site List and then press Ctrl + \

Now open Notepad or something similar and paste the clipboard, this will paste the exact <site name> that you need, if menkom is in a group then it will add the group names as needed.

For example if menkom is added directly below FlashFXP Sites and not in any group it would paste as \menkom
(Since this is just the site name without any groups the leading slash is optional, if you're wondering why my original example did not include it)

Code:
/tray /overwrite /upload \menkom /localpath="{0}" /remotepath="/public_html/" /quit
If the site menkom is in a group named "websites" then it would paste as \websites\menkom

Code:
/tray /overwrite /upload \websites\menkom /localpath="{0}" /remotepath="/public_html/" /quit
The remote path needs to be the actual path where you want the file to upload, In my original example I gave it a filename but if you want the screenshots to retain their original file name then you omit the name and just define the folder; You must make sure you include the trailing slash if you do this.

Since I don't know the structure of your server I want you to do this, connect to menkom and navigate to the public_html folder, now copy the path from the path box. It might simply be /public_html/ or it could be /home/<user>/public_html/

So now with the correct remote path obtained use it in your Argument.

Code:
/tray /overwrite /upload \menkom /localpath="{0}" /remotepath="/public_html/" /quit
bigstar is offline  
Old 09-25-2015, 09:12 PM   #10
mitch
Junior Member
FlashFXP Registered User
 
Join Date: Jan 2006
Posts: 20
Default

Quote:
Originally Posted by bigstar View Post
Ok do this..

Open the Site Manager and select menkom in the Site List and then press Ctrl + \

Now open Notepad or something similar and paste the clipboard, this will paste the exact <site name> that you need, if menkom is in a group then it will add the group names as needed.

For example if menkom is added directly below FlashFXP Sites and not in any group it would paste as \menkom
(Since this is just the site name without any groups the leading slash is optional, if you're wondering why my original example did not include it)

Code:
/tray /overwrite /upload \menkom /localpath="{0}" /remotepath="/public_html/" /quit
If the site menkom is in a group named "websites" then it would paste as \websites\menkom

Code:
/tray /overwrite /upload \websites\menkom /localpath="{0}" /remotepath="/public_html/" /quit
The remote path needs to be the actual path where you want the file to upload, In my original example I gave it a filename but if you want the screenshots to retain their original file name then you omit the name and just define the folder; You must make sure you include the trailing slash if you do this.

Since I don't know the structure of your server I want you to do this, connect to menkom and navigate to the public_html folder, now copy the path from the path box. It might simply be /public_html/ or it could be /home/<user>/public_html/

So now with the correct remote path obtained use it in your Argument.

Code:
/tray /overwrite /upload \menkom /localpath="{0}" /remotepath="/public_html/" /quit
Yessss, works it was mainly due to the fact my site was in a group, thanks so much for being patient, its the first time ive had to actually use support and ive been a supporter for many years now.

Only thing left for me to figure out is why its not copying the url to the clipboard, it should be.... cheers.... might be something with the program itself.

Edit, just on the off chance i read this post saying that anything that happens after the image is passed over to the external program is the functionality that is allowed, so i guess my final question would be... if the file is uploaded is there a way to copy the URL into clipboard of the location of that file ? This is something i read
How to use the External Command Plugin to send screenshots to other applications | Greenshot

Last edited by mitch; 09-25-2015 at 09:21 PM.
mitch is offline  
Old 09-25-2015, 09:26 PM   #11
bigstarX
Junior Member
FlashFXP Registered User
 
Join Date: Mar 2015
Posts: 1
Default

Quote:
Originally Posted by mitch View Post
Yessss, works it was mainly due to the fact my site was in a group, thanks so much for being patient, its the first time ive had to actually use support and ive been a supporter for many years now.

Only thing left for me to figure out is why its not copying the url to the clipboard, it should be.... cheers.... might be something with the program itself.
You're welcome.

I am fairly sure that the winscp script you linked did not copy the URL to the clipboard.

Right now I don't think there is a way to do this in FlashFXP since it would require a specialty function to make this work. I will look into this on Monday.

Sent from my SAMSUNG-SM-G920A using Tapatalk
bigstarX is offline  
Old 09-25-2015, 09:49 PM   #12
mitch
Junior Member
FlashFXP Registered User
 
Join Date: Jan 2006
Posts: 20
Default

Quote:
Originally Posted by bigstarÂ* View Post
You're welcome.

I am fairly sure that the winscp script you linked did not copy the URL to the clipboard.

Right now I don't think there is a way to do this in FlashFXP since it would require a specialty function to make this work. I will look into this on Monday.

Sent from my SAMSUNG-SM-G920A using Tapatalk
No worries, thanks for your help let me know how you go.
mitch is offline  
Old 09-26-2015, 02:25 PM   #13
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Okay try this..

Download and install this development build of FlashFXP
FlashFXP52_3877_Setup.exe

Then add this to the Argument

Code:
/gs=cb
This will copy the upload as a http url, now for this to work you need to have the Copy to clipboard > HTTP feature configured for the site.

Site Manager > Select the site profile > Options tab

Copy URL - Mapping

HTTP URL:
Enter the http url such as https://oss.azurewebsites.net/

Server Web Root Path:
This is the path part that needs to be removed to make the HTTP Url valid.
Such as /home/user/public_html/
bigstar is offline  
Old 09-27-2015, 06:04 PM   #14
mitch
Junior Member
FlashFXP Registered User
 
Join Date: Jan 2006
Posts: 20
Default

Quote:
Originally Posted by bigstar View Post
Okay try this..

Download and install this development build of FlashFXP
FlashFXP52_3877_Setup.exe

Then add this to the Argument

Code:
/gs=cb
This will copy the upload as a http url, now for this to work you need to have the Copy to clipboard > HTTP feature configured for the site.

Site Manager > Select the site profile > Options tab

Copy URL - Mapping

HTTP URL:
Enter the http url such as FlashFXP - Secure FTP Client Software for Windows. Upload, Download, and Synchronize your files.

Server Web Root Path:
This is the path part that needs to be removed to make the HTTP Url valid.
Such as /home/user/public_html/
Hey bigstar, im using the portable version can i install this version ? from the site download for same functionality ?
5.2.0 build 3878
mitch is offline  
Old 09-27-2015, 06:33 PM   #15
mitch
Junior Member
FlashFXP Registered User
 
Join Date: Jan 2006
Posts: 20
Default

Quote:
Originally Posted by mitch View Post
Hey bigstar, im using the portable version can i install this version ? from the site download for same functionality ?
5.2.0 build 3878
Ok, i tried it in the latest build and i do see the option so i tried it, works but without one small problem... once this is done its a proper working solution.

When i use the argument with the following
/tray /overwrite /upload \Menkom Server\menkom.com.au /localpath="{0}" /remotepath="/public_html/" /gs=cb /quit

I successfully copies the screenshot to the public_html directory, but the url that is copied into clipboard is

Page not found - Menkom Web Design & IT Support Services

Of course this is not valid because the internet browser does not interpret the public_html directory so it comes as a 404, if i could strip the public_html part then i guess it would work fine.

Even though your command line is stripping the webroot, it still seems to carry it across via the argument of the remote destination.

Did i miss something ?
mitch is offline  
Closed Thread

Tags
flashfxp, ftp, upload, achieve, cheers, give, time, clear, instructions, paypal

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:08 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)