Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Predicting resulting file names after using Copy File
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00677126
Message ID:
00677236
Views:
23
>Is anyone willing to submit code or link to code, or discuss logic that can predict the resulting file name when a command using copy file can be used with all variations of wildcard and character combinations.
>
>I am talking about a destination expresion that is not as simple as *.* or *.odb, etc...
>
>For example the program might receive:
> lcSource = "*.*"
> lcDest = "P*.T*"
>
> COPY FILE (lcSource) TO (lcDest)
>
>OR
> lcSource = "*.D??"
> lcDest = "??V?*.?F?"
>
> COPY FILE (lcSource) TO (lcDest)
>OR
> WHATEVER
>
>I know I can do ADIR to obtain a list of files from the source. What would be the best way to predict the resulting file names for the specified destination expression.
>
>Any positive comment will be appreciated

Hi,

If the DOS COPY command works for you can constrict the statement and then execute it with RUN (!) command. But trying your examples I found that copy *.* P*.T* copies the files replacing the first letter of every file name and its extension with P and T. The second example also worked the way I was expected
Venelina Jordanova

Outsourcing IT Services Ltd.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform