File Not Found error

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

File Not Found error

Post by *HBB »

Hello friends

I get "File not found" error when a network share (e.g. \\Server\Dir\SubDr) is assigned by %P%S1 or %T%S1 in button parameters. Do I miss something?

Win7HP/64 + TC9a/64

regards
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

How does your button look like? Are there spaces in the path to the file set by %P%S1?

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

Thank you Dalai

Actual example:

1) a "c:\Temp\aaa.vbs" file contains only:

msgbox "hello"

2) TC Button:

Command: wscript "c:\Temp\aaa.vbs"
Parameters: ?%P%S1 %T%S1
OR
Parameters: ?"%P%S1" "%T%S1"

3) After pressed the button in my example, TC list the command line parameters as follows:

\\MYSERVER\Users C:\Temp\Users
OR
"\\MYSERVER\Users" "C:\Temp\Users"

4) After pressed OK button:

File not found!
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

I created a button similar to yours and this works without issues:

Code: Select all

TOTALCMD#BAR#DATA
wscript "D:\aaa.vbs"
?%P%S1 %T%S1
wscript.exe,2



-1
The script contains exactly the msgbox line you posted. I selected directories with and without spaces, only on source side and then on both sides - it just works.

Which program exactly is showing this error message "File not found!"? Is it TC? If so, does the command line work on CMD?

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

Yes Dalai, the script works perfectly if you select directories as you said. Did you try it for network shares as I describe in section (3)?

For example, when %P%S1 is something like \\MYSERVER\Share, you could see the error message.

Please note that I am talking about the network shares itself (not computer directories and sub directories of network share)

Thank you for your reply
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

If network shares are selected TC shows the error message indeed. But the solution is simple: Set the button's start path to something fixed, e.g. C:\. If the start path is empty TC uses the current directory as working directory, and since \\server is not a valid working directory, it shows the error message.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

Your simple suggestion has solved the problem. I did not expect the problem is due to empty start path really!

Thank you Dalai :)
User avatar
petermad
Power Member
Power Member
Posts: 14740
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Set the button's start path to something fixed, e.g. C:\.
Maybe C:\ is not the best choice, since it requires Admin rights to write to in newer Windows versions like Windows 7, 8 or 10 - just in case any files actually has to be created by the script.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

There is another issue about a network share itself. I did not open a new topic because I think this issue is similar to discussed above.

I want to give an example for asimetric synchronization in order to describe the problem:

1) If left side pane is a list of network shares such as:

\\MYSERVER
- Share1
- Share2
:
- ShareN

2) If right side pane is a list of sub dirs of a directory, such as:

C:\TEMP
- Share1
- Share2
- :
- ShareN

3) If Share2 is selected in the left pane (marked by space or insert key)

4) When Sync tool is called, an error message appears:

---------------------------
Total Commander
---------------------------
Error - Synchronize only supports the following combinations:
directory<->directory
directory<->zip archive
directory<->ftp server
zip archive<->zip archive (compare only)
---------------------------
OK
---------------------------

Actually, Share2 is a sub directory and accessable in both sides. TC can/should synchronize Share2.

Additionally, if left and right panes are synchronized as a whole (without selecting sub shares), when all shares are accessable, TC should be able to synchronize all (maybe with a warning message).

Is this a problem in the codes or a feature which is planned especially?

Or is there something else that I could not see?
Post Reply