View Full Version : download files
eruiz
02-11-2004, 12:56 PM
Part of my exe build contains a set of files that I would like to install on more than 1 location on the user computer. Is there a way to do so? Seems like I can only specify 1 path for now?
Also,
What if I wanted to loop through the e.g. C:\files\ directory to grab the name of all its sub-folders so that I can install files in each of these sub-folders, is that possible?
Thanks
Em
csd214
02-11-2004, 02:40 PM
Q1: After install, create an action copying <MyFile.ext> from %AppDir% (or whatever) to <SecondDir>.
Q2: A suggestion: Use Actions to perform this: Create a batch file with the command “Dir C:\files\ directory > Dirview.txt”. Execute the BAT file. Read the textfile (Dirview.txt) line by line to find the subdirectories.
eruiz
02-11-2004, 02:55 PM
Ok, Q1: What if I have 100 files to copy and different directories?
Q2: I don't really understand your answer. e.g. Let's say I have
the following files:
a)
C:\files\test.txt
C:\files\sub\more.txt
And I want these 2 files to be copied to
b)
C:\new\number1\
C:\new\number2\
I don't know the names of the sub-dirs number1 & number2 and I don't how many sub-dir exist under C:\new but I want to pull out the list and then go through it and each time copy the files in a).
Is the solution you descrive adequate for this task. I appreciate your help and guidance.
Thanks
Emmanuel
csd214
02-12-2004, 04:13 PM
To copy 100 files from several sources to several destinations might be a “heavy job” also in Explorer. But can you perform the copy with Explorer, you certainly can use the SUF File Copy Actions. You can use wildcards – see the help file. (But WHY do you want to duplicate files like this….).
Try the DOS “Dir with output redirection” manually. Open a command window; go to a directory with subdirs. Execute “DIR *.* > DirTest..txt” and inspect the text file. Try Dir *. (without extension) and DIR *.(*) /S (include subdirs).
To interpret the text file you must write actions including a While Loop . Read line by line (“Get Text Line”). Your wanted subdirs will have <DIR> inside the line.. This should indeed work, but the execution time may be long (depends on the size of the text file).
Good luck!
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.