473,763 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

remote disk space ...

Hi all,

can't manage to do it ..... was so easy under solaris ....
anybody knows how to get free disk space on remote disks ???

(with both local and remote *$#@%§&* machines running *$#@%§&* W$2000)

Jul 17 '05 #1
4 6439
O.Gir <ol*****@nospam .posteasy.org> wrote:
can't manage to do it ..... was so easy under solaris ....
anybody knows how to get free disk space on remote disks ???

(with both local and remote *$#@%?&* machines running *$#@%?&* W$2000)


What is a remote disk (FS?, is it mounted?)?

BTW my guess is that you did it on Solaris using a "shell", if that's
the case you should take a look at microsofts scripting thingys
(http://msdn.microsoft.com/scripting (IIRC) and do a search for the
Scripting.FileS ysytemObject), IIRC it can do the equivalent of df.

--

Daniel Tryba

Jul 17 '05 #2
Daniel Tryba a dit:
O.Gir <ol*****@nospam .posteasy.org> wrote:
can't manage to do it ..... was so easy under solaris ....
anybody knows how to get free disk space on remote disks ???

(with both local and remote *$#@%?&* machines running *$#@%?&* W$2000)

What is a remote disk (FS?, is it mounted?)?

BTW my guess is that you did it on Solaris using a "shell", if that's
the case you should take a look at microsofts scripting thingys
(http://msdn.microsoft.com/scripting (IIRC) and do a search for the
Scripting.FileS ysytemObject), IIRC it can do the equivalent of df.


Hi,

mmmmm .... year, of course, but the goal is to do it with PHP, and to do
it *quick* (ie: no recursive scanning)

Btw, you're (close to) right, while running solaris, I did a popen('df
<filesystem>',' r'), and then parsed the output of a fgets() ...
<filesystem> being a nfs mounted FS ressource identifier ... that worked
great ...

I guess that parsing the last line of the output of a simple "dir"
command should do the job, but even if I can type "dir \\server\share"
inside a console, and obtain the result I want, doing it by this way:

exec('dir \\server\share' ,$tbdir,$retdir );
or :
$fspace=shell_e xec('dir \\server\share' );
or even:
$fspace=system( 'dir \\server\share' );

(... yes, I escaped the string before sending it ...)

.... works on local filesystems, but not on remote ones ...

.... drives me crazy ...

I'll have a close look @ the scripting ref's you gave, but I'd really
like to solve this problem strictly with php ...

Thx anyway - O.Gir.

Jul 17 '05 #3
O.Gir <ol*****@nospam .posteasy.org> wrote:
exec('dir \\server\share' ,$tbdir,$retdir );
or :
$fspace=shell_e xec('dir \\server\share' );
or even:
$fspace=system( 'dir \\server\share' );

(... yes, I escaped the string before sending it ...)

... works on local filesystems, but not on remote ones ...

... drives me crazy ...
That's propably because the user PHP is running under hasn't got the
rights to browse the shares?
I'll have a close look @ the scripting ref's you gave, but I'd really
like to solve this problem strictly with php ...


So you call use of df/dir strictly PHP! I find that extremly amusing.
You are trying do host specific stuff you can't (AFAIK) do in strictly
PHP.

BTW the links I suggested are to be used with the PHP COM extensions.

--

Daniel Tryba

Jul 17 '05 #4
Daniel Tryba a dit:

That's propably because the user PHP is running under hasn't got the
rights to browse the shares?

I'll have a close look @ the scripting ref's you gave, but I'd really
like to solve this problem strictly with php ...

So you call use of df/dir strictly PHP! I find that extremly amusing.
You are trying do host specific stuff you can't (AFAIK) do in strictly
PHP.

BTW the links I suggested are to be used with the PHP COM extensions.


No Daniel, I can swear you the user running apache/php has full read
access to these locations (..... verification .....) yes, it has ...

Yes, it's rather chimeric to try to access low level ressources of
remote disks, that's why I'm on to use system commands while I hate
doing it. But I found some interresting stuff under the link you
previously suggested (excuse me not have the reflex of msdn searching,
this universe is rather new for me ;) ), and I'm quite confident .....

O.Gir

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8996
by: emmexx | last post by:
I want to restore a huge database into my workstation. The size of the backup file is more than 6 GB and I don't have enough space on my HD for both the database and the backup file. So I put the file in a shared folder on a pc connected through a switch to my pc. My wkst uses w2k pro sp4, the other PC win xp home SP1. MSDE 2000. The share is visible and RW for the administrator of my wkst. The 2 pc are in the same workgroup and are not...
3
826
by: Lamont | last post by:
VB.NET Can anyone tell me how I can get the Drive Space information from a remote computer on the same domain and physical network? Primarily I need the Total disk space and space used or free (or both). -- Lamont - OKC Developer
6
5874
by: deko | last post by:
In a multi-user environment, I have a table that stores hyperlinks to documents that are stored on the machine that hosts the mdb database. The table entry looks like this: ProductDescription.htm#file:\\DBHOST\C$\Documents and Settings\Administrator\My Documents\Products\Documents\ProductDescription.htm Having the hyperlink in this format allows the document to be opened by anyone on the local area network.
2
8348
by: James | last post by:
Dear Access Guru's, Hopefully you can help me (as Microsoft don't seem to be able to) We have an Access database on a Windows 2003 server with 5 CALS in our office. Access is loaded onto the server. We have 2 PC's connected to it on the LAN
1
1049
by: Terry Olsen | last post by:
Running VS.NET 2003 on WinXP pro. Created ASP.NET Web App on remote Win2003 Server. Installed remote debugging tools on server. When I try to run the app, I get the following error. "Error while trying to run project: unable to start debugging on the web server. Not enough storage is available to complete this operation." I've checked disk space both on the development box and the server. Plenty (gigs) of space available. Is there...
4
12564
by: Von Thep via DotNetMonster.com | last post by:
How can I use WMI with VB.NET to get a remote computers directory size? How can I use a unc_path within WMI? Previously I used FileInfo and DirectoryInfo but this method takes too long because some of the directories are over 30GB's in size. Please help! -- Message posted via http://www.dotnetmonster.com
2
16075
by: Jas Shultz | last post by:
I'm using Win2K3 Enterprise edition with the latest .NET framework installed. I have this problem with getting "out of disk space" errors. I have 35 Gigs of disk space free. It doesn't happen all the time but it does happen. When I installed Sharepoint Services I got the error and had to reboot and then everything was fine. I get it sometime when running aspx pages. It's very odd. Usually, I can just remove the application and readd it...
8
2777
by: robert | last post by:
Hello, I want to put (incrementally) changed/new files from a big file tree "directly,compressed and password-only-encrypted" to a remote backup server incrementally via FTP,SFTP or DAV.... At best within a closed algorithm inside Python without extra shell tools. (The method should work with any protocol which allows somehow read, write & seek to a remote file.) On the server and the transmission line there should never be...
0
1399
by: trazcure | last post by:
Hi everyone, my name is Traz I'm trying to write some C# code that will check for remote disk space on network shares. I have seen across the internet and MSDN that you can utilize the System.Management class and it's methods to perform this operation. I have been able to check a variety of computers disk space successfully but not local network shares due to "Access Denied." Unfortunately, I do not have the ability to check the WMI...
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10145
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9998
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.