 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Greener than a newb Guest
|
Posted: Fri Sep 04, 2009 5:54 pm Post subject: What type of a loop |
|
|
what type of loop is this?
I have the following csv file with this info:
Frequency,Filename,Destination,Destination Filename
Sample file
------------------------
Daily,File01.txt,G:\Daily\Somewhere,DailyFile_%Date%.txt
Weekly,File02.txt,G:\Weekly\Somewhere,WeeklyFile_%Date%.txt
Monthly,File03.txt,G:\Monthly\Somewhere,MonthlyFile_%Date%.txt
------------------------
What type of loop do i create?
I know it has to read the file first and then copy each file line by line. |
|
| Back to top |
|
 |
Greener than a newb Guest
|
Posted: Fri Sep 04, 2009 5:56 pm Post subject: |
|
|
Sorry...
I want the script to read each line and copy the corresponding file to the destination using the destination name. |
|
| Back to top |
|
 |
purloinedheart
Joined: 04 Apr 2008 Posts: 537 Location: Canada
|
Posted: Fri Sep 04, 2009 6:06 pm Post subject: |
|
|
| Quote: |
know it has to read the file first and then copy each file line by line.
|
First get the directory alone, then store in variable 'Dir'
| Code: |
Loop Parse, Dir, `n
FileRead File_%A_Index%, %A_LoopField% ; File1, File2, etc contain the line with the filename
|
Then do the same with the other file
Not tested - may need some debugging |
|
| Back to top |
|
 |
greener than newb Guest
|
Posted: Fri Sep 04, 2009 6:12 pm Post subject: |
|
|
thanks for pointing me in the right direction...
will work on it. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|