Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I was going to post a code snippet enclosed in code tags but I got this :
 

Attachments

  • Screen Shot 2014-10-04 at 02.44.02.png
    Screen Shot 2014-10-04 at 02.44.02.png
    81.7 KB · Views: 109
  • Filename into an URL.zip
    8.1 KB · Views: 213
Thanks for your fast answer

It worked just like I wanted, but is it possible to make a script that just take the addad file an make an URL of that, not the other files in the folder. I also wonder if it is possible to put the filename in the middle of the URL like below

www.mydomain.com/foldername/filename.jpg?login=get:get

In this URL is everything static except "filename.jpg" that I want to be the name of the file I adds to the folder.
 
I saw one ing more

I didn't understand this at first, but now the files will be sent to the trash. What should I write if I want to send it to another folder instead

thanks in advance
 
It worked just like I wanted, but is it possible to make a script that just take the addad file an make an URL of that, not the other files in the folder. I also wonder if it is possible to put the filename in the middle of the URL like below

www.mydomain.com/foldername/filename.jpg?login=get:get

In this URL is everything static except "filename.jpg" that I want to be the name of the file I adds to the folder.

Replace this :

Code:
tell application "System Events"
	...
end tell

with this :

Code:
tell application "System Events"
	set this_folder_name to this_folder's name
	set these_items_names to {}
	repeat with this_item in these_items
		set end of these_items_names to name of this_item
	end repeat
end tell

and this :

Code:
set end of filenamesURL to encode_text(base_URL & this_folder_name & "/" & this_item_name, false, false)

with this :

Code:
set end of filenamesURL to encode_text(base_URL & this_folder_name & "/" & this_item_name & "?login=get:get", false, false)

I didn't understand this at first, but now the files will be sent to the trash. What should I write if I want to send it to another folder instead

thanks in advance

Example :

Code:
tell application "Finder" to move these_items to folder "Done" of folder "Images" of folder "flowerimages" of folder "Desktop" of home
-- or
-- same thing as above but as an alias
tell application "Finder" to move these_items to alias "MavericksDP:Users:kryten:Desktop:flowerimages:Images:Done:"

Note : Look at the attached thumbnail for the folder structure.
 

Attachments

  • Screen Shot 2014-10-05 at 22.39.16.png
    Screen Shot 2014-10-05 at 22.39.16.png
    17.8 KB · Views: 159
Many thank's

I have been away for a couple of day's, but today did I try your new code and everything worked just like I wanted. Thank's a lot
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.