SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Feb 2000
    Location
    Nottingham, England
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Verifying the size of a file

    I am looking to verify the size of a file on a remote machine, is there any command out there which will do such a thing. I'm not interested in the amount of free disk space or anything like that, all I want to know is the size of 1 individual file.

    Thanks.

    ------------------

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Location
    Dublin, Ireland
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verifying the size of a file

    Hi Danny,

    You need to use the SYS_GetDirContents function. This function returns a list of information of all files in a given directory (FILEINFO). One of the attributes of FILEINFO is file size.

    I hope that this helps.

    John.

    ------------------

    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com
    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com

  3. #3
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verifying the size of a file

    Unfortunately, Silk only does file operations on local files. You'll need to either copy the file to your local machine, then do John O's suggestion, or open it with an editor on the remote machine, and somehow read its contents and get their size.

    Hope this helps.

    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.com

  4. #4
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verifying the size of a file

    I assume you are using silk on a windows OS.

    Do a simple mapping of the remote machine's HD. Afterwards just access the file as it is in your machine.

    If you don't know how to do a mapping for non-windows machine from windows machine ask IT:P Cuz I don't know either.

    ------------------

  5. #5
    Member
    Join Date
    Aug 2000
    Location
    Hyderabad,AP,India
    Posts
    80
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verifying the size of a file

    Hi Guys,

    I dont know how far it is correct, I just made some thing below... I am a beginner, I need corrections Please....

    ----------------

    [+] type File_Name_And_Dir is record
    [ ] String file_name
    [ ] String dir_name
    [ ]
    [+] File_Name_And_Dir GetTheDir (String sPath)
    [ ] File_Name_And_Dir ret
    [ ] String file,dir
    [ ] Integer i=1
    [+] while (GetField (sPath,"\",i)!="")
    [ ] file=GetField (sPath,"\",i)
    [ ] i++
    [ ] dir=StrTran (sPath,file,"")
    [ ] ret.file_name=file
    [ ] ret.dir_name=dir
    [ ] return ret
    [ ]
    [+] testcase test () appstate none
    [ ] LIST OF ANYTYPE dir_info
    [ ] FILEINFO file_info
    [ ] Integer i, Size
    [ ] String path="E:\BackUps\Baseer\Personal\annegeddes6\backg round.jpg"
    [ ] File_Name_And_Dir user
    [ ] Boolean flag=false
    [ ] connect ("baseer")
    [ ] user=GetTheDir (path)
    [ ] dir_info=Sys_GetDirContents (user.dir_name)
    [+] for (i=1;i<ListCount (dir_info);i++)
    [ ] file_info=dir_info[i]
    [+] if (file_info.sName==user.file_name)
    [ ] Size=file_info.iSize
    [ ] flag=true
    [+] if !flag
    [ ] Printf ("\n\n*** Error: The file does not exist in thsi directory.")
    [ ] exit
    [ ] Printf ("\n\nThe size is : {Size}.")
    [ ] disconnect ("baseer")

    ----------------


    -Baseer

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:46 PM.

Copyright BetaSoft Inc.