| View previous topic :: View next topic |
| Author |
Message |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Thu May 08, 2008 1:42 pm Post subject: File renaming problem |
|
|
Am I doing something wrong? It doesn't seem that VDS6 can rename files with file names longer than 8 characters. I have tried executing the following code:
| Code: | | file rename, magtjoe0508111222.pdf, magt0508111222READ.pdf |
It renames the file to "magtjoe0.pdf". It just takes the first 8 characters and the file extension.
I seem to be able to rename an 8-character file name to anything I want.
Is this a bug? _________________ Joe Floyd |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu May 08, 2008 1:50 pm Post subject: |
|
|
jwfv,
What operating system are you using? I don't have that problem with the following code.
| Code: |
Title test file Rename
Directory change,D:\inetroot\
File rename,NewTextDocument2.txt,NewTextDocument.txt
|
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Thu May 08, 2008 2:20 pm Post subject: |
|
|
I am using XP.
When I run your code, it renames the file "NewTextD.txt" _________________ Joe Floyd |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu May 08, 2008 3:13 pm Post subject: |
|
|
Wow that is strange because I am using XP here as well. Does it do this in both the IDE and compiled? Are you by chance compiling as a console application? _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Thu May 08, 2008 3:22 pm Post subject: |
|
|
I have tried it both ways (compiled and IDE) and it is the same. I believe it is a Windows XP settinigs issue. I googled the problem and found some other talk about it.
I have found a solution that works for me:
I just use the @shortname() function for the first parameter and it seems to work fine.
Thanks - _________________ Joe Floyd |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu May 08, 2008 3:56 pm Post subject: |
|
|
| jwfv wrote: | I have found a solution that works for me:
I just use the @shortname() function for the first parameter and it seems to work fine.
|
That is what I was going to suggest...
What Service Pack are you on for Windows XP just so I can make CR aware of this? _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Thu May 08, 2008 6:37 pm Post subject: |
|
|
Service pack 2.
Thanks - _________________ Joe Floyd |
|
| Back to top |
|
 |
webdaddy Contributor


Joined: 14 Nov 2004 Posts: 151 Location: Raleigh NC
|
Posted: Fri May 09, 2008 6:17 pm Post subject: Registry Setting for 8.3 File Names |
|
|
Here is what you need to look at...
System Key: [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem]
Value Name: Win31FileSystem
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = long file names, 1 = 8.3 filenames)
If the key is set to 0 your Winxp will support long file names
If your setting is 1 then it will enforce Old Dos compatibility and will only allow 8.3 naming conventions.
Hope this helped.
Webdaddy _________________ K Wetzel
Programming - Technology - Communications
"The Home of the SLC Security Console"
SLC now available for Linux... |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Fri May 09, 2008 6:23 pm Post subject: |
|
|
I checked that setting and mine is set to accept long filenames (it is 0.) And I haven't had any other problems with long filenames - just as that first parameter in the FILE RENAME command. _________________ Joe Floyd |
|
| Back to top |
|
 |
|