How to select and copy multiple/random files through sikuli?

Asked by Dhaval Rajput

I am trying to select multiple random files through Sikuli IDE but not able to select through keyword syntax?

Suppose on C: drive I have one folder TEST 123 and in their folder approx 25 files exists. Now I want to select only 5 files random and copy those files and paste into another folder.

Can anyone please help how can I write my code through keyword functions?

I am trying to first select and click my 1st file and press CTRL button, now I move down and trying to click SHIFT for selecting 2nd file and next next...

This is sample code
================

find("Sample File.png")
click("Sample File.png")
keyDown(Key.CTRL)
type(Key.DOWN)
type(Key.DOWN)
type(Key.DOWN)
type(Key.DOWN)
type(Key.SHIFT)
type("c", KEY_CTRL)

Thanks in advance for the same.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

do not fiddle around visually, just use Python's baked in file features.

look for
- how to list files in a folder
- how to copy files

Can you help with this problem?

Provide an answer of your own, or ask Dhaval Rajput for more information if necessary.

To post a message you must log in.