In Windows I can access home network filesystem like:
dir \\COMPUTERNAME\sharedfoldername\*.*
This notation doesn't seem to work with OOBASIC.
Is there any way with BASIC or using UNO services to access files and directories on another home network computer?
Thanks in advance.
Accessing network filesystem
Re: Accessing network filesystem
try
The reason for the 3 /s in file: an http: URLs is that they go //hostname/restOfTheFileDescriptor. /// = localhost
Code: Select all
Sub Main
print ConvertToURL("\\COMPUTERNAME\sharedfoldername\*.*")
print ConvertToURL("D:\*.*")
End Sub
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
Re: Accessing network filesystem
Yes but a returns always an empty string. Conversions working but the file accessing part is problematic.
Code: Select all
print dir("\\COMPUTERNAME\sharefoldername\")
Re: Accessing network filesystem
Yup, there does seem to be a issue here with UNC enumeration in the dir function. I haven't tried other operations such as open. A work around is to use explorer to map the network drive, or do a net use X: \\COMPUTERNAME\sharedfoldername at the command prompt. You will find that dir "X:\*.*" works fine.
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
Re: Accessing network filesystem
In my case that's not enough. I'm trying to write a stand-alone File and Directory Synchronization application using Base, that would work in local files as well as local networks with Windows or Linux machines. UNO is perfect for hiding OS specific differences, and I would like a UNO solution to this problem.
Thanks anyway.
Thanks anyway.