Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with file copy
Message
From
07/01/2015 04:12:11
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01613217
Message ID:
01613220
Views:
50
I have two comments. In the strtran() line, your syntax is wrong, you use "+" instead of ",". Secondly you should avoid macros whenever possible, they can cause unpredictable results, especially if you have spaces somewhere. This code does the same job.
hh = forceext("d:\outmail\out" +chrtran(ttoc(datetime()),' :-',''),'dbf')
select outmale
copy to (hh)
>hh="d:\outmail\out"+TTOC(DATETIME())+".dbf"
>hh=STRTRAN(hh," "+"")
>hh=STRTRAN(hh,":"+"")
>hh=STRTRAN(hh,"/"+"")
>
>
>the value of hh is d:\outmail\out07012015084913.dbf
>
>SELECT outmail
>
>COPY TO &hh
>
>I get invalid path or filename - what am I doing wrong?
>
>d:\outmail dirctory exists exists as does the file outmail
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform