Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Long Filenames in FoxPro for DOS
Message
From
28/03/2016 04:00:17
 
 
To
28/03/2016 01:20:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
FoxPro Dos
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01633840
Message ID:
01633843
Views:
105
This message has been marked as the solution to the initial question of the thread.
>Hi All,
>
>I have been asked for assistance on a Foxpro DOS system.
>
>Basically, all my friend wants is to create a text file with a long filename.
>
>I have done the following to no avail:
>
>1. used RUN in the Command Window
>
>run /0 copy mytext.txt mylonglongtext.txt
>or
>run copy mytext.txt mylonglongtext.txt
>
>The response was "Duplicate file name or file not found"
>
>2. tried using FCREATE(), FPUTS() and FCLOSE()
>
>x = FCREATE( "mylonglongtext.txt" )
>= FPUTS( x, "Hello World" )
>= FPUTS( x, "Hello Again" )
>= FCLOSE( x )
>
>The resulting filename is truncate to just "mylonglo.txt" (DOS 8.3 format)

This works for me using FPD 2.5b on Windows Server 2003 (should also work on XP, not tested on Vista or higher):
run cmd.exe /c copy c:\somepath\file.txt c:\somepath\filefilefile.txt

* If there are spaces in the source path or target path or file name you need to use double quotes:
run cmd.exe /c copy "c:\some path\file.txt" "c:\some other path\file long name.txt"
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform