Sign in to follow this  
Followers 0
jim read

VMWARE and FileFindFirstFile

8 posts in this topic

Hi,

I do not normally post questions since the forum is so complete that I can search and find answers that have already been posted.

I have a script that works fine in windows XP but refuses to work on a XP Guest Running on VMWARE I have the latest VMWARE (downloaded and install 7-2008)

I have installed VMWARE tools and even tried the VIX program to enable scrips but nothing has helped.

The command is real simple

$search = FileFindFirstFile("c:\reports\*.csv")

msgbox(0,"Found should be > -1",$search)

search is always -1

I have tried it on a mapped drive with the same results

Any help would be apreciated.

Jim

Share this post


Link to post
Share on other sites



Is C:\ the right drive? In VM it is probably a different letter, or does this happen when you change the path accordingly too?


Regards,Josh

Share this post


Link to post
Share on other sites

JFee Thank you for replying

C:\ - is the drive I have it on now. It is the local vmware guest machines c: drive.

But I get the same result if it is a mapped network drive or a UNC path - actually no matter where the drive is pointed it exhibits the same behavior.

This same function runs fine on a Standerd XP workstation.

Jim

Share this post


Link to post
Share on other sites

Tested on host, and 2 VMs via VMWare Server.

All three worked fine for me

XP Pro Host

XP Pro VM

2008 Server VM

Strange that it isn't working for you.

Share this post


Link to post
Share on other sites

Don't know if it would matter but... is the C capital on yours? Shouldn't make a difference...

Does this work if you run it on your computer, not the VM? Have you tried different paths?


Regards,Josh

Share this post


Link to post
Share on other sites

Don't know if it would matter but... is the C capital on yours? Shouldn't make a difference...

Does this work if you run it on your computer, not the VM? Have you tried different paths?

$pc = @computername

Try "\\" & $pc & "\c$\file.txt")

Share this post


Link to post
Share on other sites

Thank all of you for your assistance.

I looked at everything and it all seamed fine then I opened a dos box and noticed that the application that is creating the file created it report.csv.txt instead of report.csv of course the extension was hidden because it was a known type. I feel sorta dumb not looking for an extension change in the first place.

This only happens on the VMware box But it is not a autoit script so I will just adjust my script accordingly.

Thanks again

Jim

Share this post


Link to post
Share on other sites

We all have those days Jim, thanks for letting us know it was just a PEBKAC muttley

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0