Hi Marcus
Please read the post again. It says:
I know I could just copy the file, but the next part of the script will keep the file and write to it in the future using the name which is a variable.
Ive been working all day on the script, heres what I got:
Code: Select all
GetFileList>C:\Documents and Settings\Owner\My Documents\Outlook backup Files\*.txt,files
Separate>files,;,file_names
Let>k=1
Repeat>k
StringReplace>file_names_%k%,C:\Documents and Settings\Owner\My Documents\Outlook backup Files\,,file_name
// I NEED TO SAVE ,r,file_name AND USE IT IN THE FILE NAME PART BELOW %file_name%
Let>k=k+1
Until>k,file_names_count
// THIS PART BELOW WOULD WRITE A COMMENT AT THE TOP OF THE NEW TEXT
Let>WriteFromFile=C:\Documents and Settings\Owner\My Documents\Outlook backup Files\%file_name%
Let>WriteToFile=C:\Documents and Settings\Owner\My Documents\Outlook backup Files\BackUps\%file_name%
Day>the_day
Month>the_month
Year>the_year
GetTime>time
Let>Comment=//
Let>msg=%Comment% The Email Named: %WriteFromFile% was Updated on %the_month%/%the_day%/%the_year% at %time%
WriteLn>%WriteToFile%,result,%msg%
// THIS IS WHERE I THINK THE PART I NEED HELP WITH WOULD GO !!!
// THIS PART BELOW WOULD WRITE TO THE TEXT
Let>L=0
Label>Write_To_Email
ReadLn>%WriteFromFile%,L,line
If>line=##EOF##,finish
WriteLn>%WriteToFile%,result,%line%
Let>L=L+1
Goto>Write_To_Email
Label>finish
WriteLn>%WriteToFile%,result,
WriteLn>%WriteToFile%,result,
WriteLn>%WriteToFile%,result,=========================================================================
WriteLn>%WriteToFile%,result, New Email Below
WriteLn>%WriteToFile%,result,=========================================================================
// I WOULD THEN WANT TO DELETE THE FILE I WROTE FROM SO AS NOT TO WRITE IT AGAIN.
I dont need to write the names, I need them to find the file name and then save it as a var and use it in the script.
Hopefuly this makes sence, I suck at explanations
The rest of the script is out of place but thought it would help to see the rest of the code and what im doing.
Also, back to my original post.
I would need ifFileExiste to be running always to grab the new file, write to the text file in the backups folder and then delete the original text filein the Outlook backup Files.
ifFileExist
start the macro above
Thanks