Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying files to another directory
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01642909
Message ID:
01642976
Views:
22
>>>>
>>>>when I run it again it does the same thing with the second file until all the files have been moved and processed
>>>>
>>>>Is that clearer - thanks for all your help
>>>
>>>Yes, this code process all files in that folder.
>>>If you do not need all just remove cycle :-)
>>>
>>>lcFileName = SYS(2000,"c:\citisprint\sttach\*.*")
>>>RENAME ("c:\citisprint\attach\"+lcFileName) TO ("c:\citisprint\attachxls\"+lcFileName)
>>>
>>>
>>>But I'm still not sure what you mean by FIRST?
>>>When I order files by name then first file is different than that when I ordered them by extension or by size.
>>
>>I have say 10 files in the directory called attach
>>
>>on day one for example when I run my code i want to move one of these files to the attachxls directorey with a filename of attach.xslx
>>
>>I then convert this file to an xls file and process it - the are now only 9 files in the original attach directory
>>
>>On day 2 for example I want to do the same thing - with the first of the remaining 9 files
>
>If you don't care which one will be moved, then this is the code :-)

SORRY

Sorry I forgot to say that the files in the attach directory will all have different names

But each day (or each time my code is run) one of them is moved to the attachxls directory with a name of attach.xslx for further processing
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform