forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


File renaming problem

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Thu May 08, 2008 1:42 pm    Post subject: File renaming problem Reply with quote

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
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu May 08, 2008 1:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Thu May 08, 2008 2:20 pm    Post subject: Reply with quote

I am using XP.

When I run your code, it renames the file "NewTextD.txt"

_________________
Joe Floyd
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu May 08, 2008 3:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Thu May 08, 2008 3:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu May 08, 2008 3:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Thu May 08, 2008 6:37 pm    Post subject: Reply with quote

Service pack 2.

Thanks -

_________________
Joe Floyd
Back to top
View user's profile Send private message
webdaddy
Contributor
Contributor


Joined: 14 Nov 2004
Posts: 151
Location: Raleigh NC

PostPosted: Fri May 09, 2008 6:17 pm    Post subject: Registry Setting for 8.3 File Names Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Fri May 09, 2008 6:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group