How to get the specify images file name to variable?

  • Автор темы Автор темы jackeyroe1
  • Дата начала Дата начала

jackeyroe1

Client
Регистрация
17.10.2013
Сообщения
218
Реакции
50
Баллы
28
Hi friends

I have a question, for example, I have 3 jpg images in my folder "images", the 3 images file are: aImage.jpg bImage.jpg cImage.jpg

Now I want upload these 3 images one by one to sample site, then get the specify image name as variable, then delete the image after it uploaded.

The process may like the following:

get aImage.jpg from "images" folder to upload to sample site -> get the image name "aImage" (without '.jpg') as project variable "imageName" -> delete aImage.jpg

Is there any actions or C # could do this?

Any kind friend could tell me? :)




Thanks much !!!
 
Hi, first create a list. You can use "Get file list" action (Action-->Data-->Directories) and your 3 jpg file paths will be in the choosen list. Then you can use list porccesing "get line" go get one of the file pathes and use the variable to upload the images. If you activate "delete line after taking" in the list proccsing you can loop these actions until the list is empty.
 
  • Спасибо
Реакции: lokiys и jackeyroe1
Hi, first create a list. You can use "Get file list" action (Action-->Data-->Directories) and your 3 jpg file paths will be in the choosen list. Then you can use list porccesing "get line" go get one of the file pathes and use the variable to upload the images. If you activate "delete line after taking" in the list proccsing you can loop these actions until the list is empty.
Very helpful! Thanks much! :)
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)