Click here to Skip to main content
16,012,166 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
all files in a subfolder and they are pdf files
Posted

1 solution

1. Use Io.Directory.GetFiles[^]
to get a list of files from a directory

2. Generate random number[^] between 0 and number of files

3. Take resulting number as index of a file from file collection and copy it.
 
Share this answer
 
Comments
Member 11026295 22-Sep-14 3:44am    
thank you sir
Sinisa Hajnal 22-Sep-14 4:29am    
No problem. Accept the solution if it helped.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900