Page 1 of 1

Temp directory redireting to Desktop

PostPosted: Wed Aug 13, 2014 3:14 am
by DaveJ
I have a very strange fault where I have created a pub that copies data from a network location to a folder within the temp directory as below.
Code: Select all
fmConnectLocal "remote" "InitialPath=\\remotedriveshare\Workshop\Barcode"
fmConnectLocal "local1" "InitialPath=[Tempdir]Barcode"
Setvar "status" "Loading"
fmSelectAll "remote" "IncludeFiles=Yes;IncludeFolders=No"
Setvar "status" "Copying to temp"
fmCopySelected "remote" "local1" "GetConfirmation=Yes;ShowProgress=Yes;AllowResume=No"
Setvar "status" "Done"
Delay "1000"
Run "[TempDir]Barcode\BMS11.exe" "" "LoadComplete" "" ""
Exit "" ""


Every time I try and run this, it shows the local directory to be the desktop and the remote directory.

These are the variable saved;
LastError=The system cannot find the file specified
local1.CurrentDir=C:\Users\David.Jarrard\Desktop
local1.FileMask=*.*
local1.Status=Connected
local1.TotalItems=63
remote.CurrentDir=C:\Users\David.Jarrard\Desktop
remote.FileMask=*.*
remote.SelCount=0
remote.Status=Connected
remote.TotalItems=63
status=Done
How can I fix this?

Thanks

Dave J

Re: Temp directory redireting to Desktop

PostPosted: Wed Aug 13, 2014 5:26 am
by Gaev
Dave J:

I tried the sample that came with the plugin ... and modified it to connect to [TempDir] ... and it popped up a message telling me that it could not connect to that folder ... tried another folder and it worked fine.

Because the fmConnectLocal command failed, the plugin defaulted to my Desktop folder.

If you did not see an error message, check whether you have turned OFF the showing of errors (e.g. fmShowErrors "No").

Re: Temp directory redireting to Desktop

PostPosted: Wed Aug 13, 2014 6:45 am
by DaveJ
Thanks Gaev,
I haven't turned off errors but that sounds like the issue.
It doesn't explain why however the plugin cant use the temp directory. Most other programs use the temp directory and I also did an xcopy command to do the copy and it worked ok.
It just seems to be an issue with the plugin!

Dave J

Re: Temp directory redireting to Desktop

PostPosted: Wed Aug 13, 2014 7:35 am
by Gaev
Dave J:
It doesn't explain why however the plugin cant use the temp directory. Most other programs use the temp directory and I also did an xcopy command to do the copy and it worked ok.
It just seems to be an issue with the plugin!

It might have something to do with combination of Protocol and File Access Rights ... you/user would have full access rights when using File protocol but (perhaps) not FTP.

Re: Temp directory redireting to Desktop

PostPosted: Wed Aug 13, 2014 10:42 am
by DaveJ
Hi Gaev,
Would me as the user not have the same rights as when I execute the xcopy command within a dos prompt.
Im using the file management and not FTP so would have thought it would work.
I think I will need to put in a request to Neosoft unless Dave is already reading this.

DaveJ

Re: Temp directory redireting to Desktop

PostPosted: Wed Aug 13, 2014 10:47 am
by DaveJ
Just to add another bit of info. if I
Code: Select all
CreateFolder "[tempdir]barcode2"
it creates a folder ok in the temp directory so its not a Neobook permissions issue.

Re: Temp directory redireting to Desktop

PostPosted: Wed Aug 13, 2014 11:57 am
by Neosoft Support
Here's what's happening: The Temp folder is a hidden directory. Like Windows Explorer, FM/FTP default setting is to not show hidden folders. Since the Temp folder is hidden you can't navigate to it. To rectify this problem you need to tell FM/FTP to show hidden files, before navigating to the Temp folder. For example:

Code: Select all
fmConnectLocal "local1" ""
fmSetFileBrowserProperties "Local1" "ShowHiddenFiles=Yes"
fmChangeDir "Local1" "[TempDir]Barcode"
...

Re: Temp directory redireting to Desktop

PostPosted: Wed Aug 13, 2014 1:38 pm
by DaveJ
Thanks Dave, I would never have got that on my own.
It still leaves me with a slight problem that the plug-in doesn't seem to support UNC paths.
It seems that the only way is to create a mapped drives and the possibility it could clash with another mapped drive.
So that I can easily update my program without going to every machine and reinstalling the application, I make a directory on my server containing all my required files. This is then copied to the temporary directory on the local machine via its UNC path and then the main program file is run from the temp folder. When the program terminates it deletes the directory.

I don't really want to create a permanent mapped drive so I may have to rethink the concept.

Dave J

Re: Temp directory redireting to Desktop

PostPosted: Thu Aug 14, 2014 11:14 am
by Neosoft Support
No FM/FTP won't work with UNC paths. Maybe this is something we can address in the future.