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 


Writing to a UNC path

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Mon Jun 20, 2005 4:29 pm    Post subject: Writing to a UNC path Reply with quote

Does VDS support reading and writing to an UNC path? Or does this require an external dll?

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Tue Jun 21, 2005 3:33 pm    Post subject: Reply with quote

Nobody has any clue? Sad

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
webdaddy
Contributor
Contributor


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

PostPosted: Tue Jun 21, 2005 4:31 pm    Post subject: Testing Reply with quote

Looking at this now. I dont think it will work. I would think you would need to map the drive and ensure that it is available. I have written scripts that map the drive automatically however to accomplish this same thing and then simply write to the drive that has been mapped. Good luck man.
_________________
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
webdaddy
Contributor
Contributor


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

PostPosted: Tue Jun 21, 2005 4:32 pm    Post subject: Try This and See Reply with quote

Code:
file copy,a:\file.ext,\\host\share

_________________
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
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Tue Jun 21, 2005 4:52 pm    Post subject: Reply with quote

Thanks,
What I was trying to do, was to test for the existence of a directory...

Code:
if @file(\\host\share,D)
  rem do somethng
end


...but was unsuccessful.

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
Ciulla
Newbie


Joined: 04 May 2004
Posts: 11

PostPosted: Tue Jun 21, 2005 7:09 pm    Post subject: Writing to a UNC path Reply with quote

I write to shares all the times, like you said you cannot validate that the root of the share exists.

I create folders under the share and then check for the folder, if I am writing to the root of the share then I test that the savefile or file copy return an OK status.
Back to top
View user's profile Send private message
Ciulla
Newbie


Joined: 04 May 2004
Posts: 11

PostPosted: Tue Jun 21, 2005 7:58 pm    Post subject: Reply with quote

Try this

%%Directory_Path = \\Host\Share
If @Not(@Null(%%Directory_Path))
%S = %%Directory_Path
LOADLIB shlwapi.dll
%%Valid_Path = @LIB(shlwapi.dll,PathIsDirectoryA,BOOL:,@ADDR("%S"))
If %%Valid_Path
%%Root_Path = @LIB(shlwapi.dll,PathIsRootA,BOOL:,@ADDR("%S"))
If %%Root_Path
Info %%Directory_Path Directory is Valid and is the Root of the Path
Else
Info %%Directory_Path Directory is Valid and is not the Root of the Path
End
Else
Info %%Directory_Path Directory is Not Valid
End
FREELIB shlwapi.dll
End
Back to top
View user's profile Send private message
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Tue Jun 21, 2005 9:19 pm    Post subject: Reply with quote

Thanks, Smile

I'll play with that, and let you know what I find...

Hooligan

_________________
Hooligan

Why be normal?
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