Conditional, global search and replace?
Moderators: Moderators, Tech Support
- 
				Zorak
 - Tech Support

 - Posts: 3112
 - Joined: Thu May 13, 2004 9:59 am
 - Location: PowerChurch Software
 - Contact:
 
Re: Conditional, global search and replace?
That error happens when the path you are telling it to COPY TO doesn't exist.
			
			
									
									
						Re: Conditional, global search and replace?
Ah, of course. On the computer where I got the error, the name of the user's folder includes the domain name. I just tried 
but that gives the same error--maybe FoxPro won't expand environment variables?
Hard-coding the full path works.
			
			
									
									Code: Select all
COPY TO "%USERPROFILE%\DESKTOP\TEMP.XLS" TYPE XL5Hard-coding the full path works.
Mark Berry
						- 
				Zorak
 - Tech Support

 - Posts: 3112
 - Joined: Thu May 13, 2004 9:59 am
 - Location: PowerChurch Software
 - Contact:
 
Re: Conditional, global search and replace?
It does not. I just tried CD %USERPROFILE% with and without quotes and got invalid path or filename.
			
			
									
									
						Re: Conditional, global search and replace?
I do like a challenge 
. Looks like GETENV will do it.
			
			
									
									Code: Select all
COPY TO GETENV("USERPROFILE") + "\DESKTOP\TEMP.XLS" TYPE XL5Mark Berry
						Re: Conditional, global search and replace?
In case anyone is following this thread:  I realized that the SELECTs were including profiles whose attendance was expected (active in the 1002 activity) whether they were Present or not. I updated the three scripts to add "and atdata.status = 'P'", which confirms that the person was Present at the activity.
See this post above for the updated scripts: viewtopic.php?p=45901#p45901.
			
			
									
									See this post above for the updated scripts: viewtopic.php?p=45901#p45901.
Mark Berry