Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Renaming numeric file names
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00020260
Message ID:
00020447
Vues:
48
>>>>>I am having a beast of a time renaming numeric filenames
>>>>>
>>>>>
>>>>>VFP 3.0b keeps saying File does not exist or something to that effect (file not found?) but it does.
>>>>>
>>>>>I tried the following on a fresh exec of vfp:
>>>>>
>>>>>I created a file called 12345678
>>>>>
>>>>>rena 12345678 TO junk.txt (file does not exist)
>>>>>copy file 12345678 to junk.txt (no problem)
>>>>>dele file 12345678 (no problem)
>>>>>rena junk.txt to 12345678 (no problem)
>>>>>rena 12345678 to junk.txt (file does not exist!)
>>>>>
>>>>>GRRRRR!!!!!!!!!!!!!!!!
>>>>>
>>>>>Frustrated and confused needing any input on this problem...(filenames already exist and can't be
>>>>>changed due to prior policies that are in place, however I need to be able to temporarily rename them and rename them back again!!!)
>>>>>
>>>>>Thanks for any assistance.
>>>>
>>>>Robert: Have you considered taking a step back in time and usinge the RUN command so the renames are done in DOS? Your users will have to put up with the flash of a DOS screen, but all file names would be acceptable.
>>>>
>>>>This isn't just a VFP problem - I had problems over 5 years ago when a client insisted that all files start with the year - 92jan, 93mar, etc.
>>>>
>>>
>>>I considered it, but . . . If I'm desperate I will, I'm already flashing them w/ PKUNZIP. No use licensing the windows version when we'll be reorganizing w/ in a month.
>>>
>>>Perhaps there is a Win API call that I can use.
>>
>>maybe I don't understand, or system differences. I did this and it worked.
>>modi comm c:\temp\1234.txt
>> wrote some text and closed it
>>rename c:\temp\1234.txt to c:\temp\test.txt
>>modi comm c:\temp\test.txt
>> text was there in ifle. closed it
>>rename c:\temp\test.txt to c:\temp\1234.txt
>>all ok
>>
>>Using VFP 5.0 and Win95. Also noticed refrence to implied path in the rename command, maybe this is what is doing it ?
>
>
>I am using VFP 3.0, however try it with a filename that is "just" numbers.
>No .TXT. remember these filenames already exist in their current format and at least for now cannot be changed globally to support any particular standardizations.

OIC, no file extension, I missed that. I'll try that
Glenn
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform