Use FILE(GLOB) to get a list of files first. Don't recall if you can specify multiple files with scp, but if not, you can always use a foreach().
-Johan On Fri, Feb 11, 2011 at 11:28 AM, Mihai Sandu <voyage...@gmail.com> wrote: > I want to upload multiple files and I think to do it with scp. > > function (SSHUpload WORKDIR HOST USERNAME SOURCE DESTINATION) > > find_program( SCP_PATH NAMES scp ) > > execute_process(WORKING_DIRECTORY ${WORKDIR} > > COMMAND ${SCP_PATH} ${SOURCE} > ${USERNAME}@${HOST}:${DESTINATION} > ) > endfunction () > > And I call the function: > > SSHUpload( "/home/user/tmp" "HOST" "USERNAME" "*" "DESTINATION" ) > > but I get the error: *: No such file or directory > > There is another way? Or where I'm wrong? > > PS: I tried also with scp -r but it take the folder, and I want only the > files from folder. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake >
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake