Command line to synchronize briefcase?

D

David Trimboli

To temporarily deal with a network slowness issue, we've set up a user
with a briefcase to work locally, and to synchronize with his network
files when he's done. (We're not using Offline Files because he's not
actually going offline.)

I thought it would help if I could find a way to synchronize the
briefcase automatically, either as a logon and logoff script or as a
Scheduled Task. Some searching on the Internet leaves me little hope
that there is a way to do this: others have asked, but I have found no
responses.

Does anyone here know of a way to script the synchronization of a
briefcase?

David
Stardate 6276.9
 
D

David Candy

I can tell you the command line for the first dialog you can see. But that seems to be it. A briefcase is a ordinary folder with two files in it.

This code can do it. As it is it enumerates every command. For me Update All is 2. So
' objItemVerbs.item(2).doit

will do it if you run the rest of the code. There may be a simplier way - see underneath this way (I'll let you experiment).


set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A & vbcrlf & i
' objItemVerbs.item(i).doit
i = i + 1
Next

Or Try these two ways

Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"


'This line on are comments only
'Note if a letter is underlined you must insert an ampersand before it.
'Normally only the first line and the line below is needed for most verbs. Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory] [,vOperation] [,vShow])
 
D

David Candy

Guess I wasted my time with this dickwad.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
"David Candy" <.> wrote in message I can tell you the command line for the first dialog you can see. But that seems to be it. A briefcase is a ordinary folder with two files in it.

This code can do it. As it is it enumerates every command. For me Update All is 2. So
' objItemVerbs.item(2).doit

will do it if you run the rest of the code. There may be a simplier way - see underneath this way (I'll let you experiment).


set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A & vbcrlf & i
' objItemVerbs.item(i).doit
i = i + 1
Next

Or Try these two ways

Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"


'This line on are comments only
'Note if a letter is underlined you must insert an ampersand before it.
'Normally only the first line and the line below is needed for most verbs. Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory] [,vOperation] [,vShow])
 
A

Al Dunbar [MS-MVP]

Maybe not. Maybe he just forgot to thank you...

/Al


"David Candy" <.> wrote in message
Guess I wasted my time with this dickwad.

--
----------------------------------------------------------------------------
----------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
"David Candy" <.> wrote in message
I can tell you the command line for the first dialog you can see. But that
seems to be it. A briefcase is a ordinary folder with two files in it.

This code can do it. As it is it enumerates every command. For me Update All
is 2. So
' objItemVerbs.item(2).doit

will do it if you run the rest of the code. There may be a simplier way -
see underneath this way (I'll let you experiment).


set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David
Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A & vbcrlf & i
' objItemVerbs.item(i).doit
i = i + 1
Next

Or Try these two ways

Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"


'This line on are comments only
'Note if a letter is underlined you must insert an ampersand before it.
'Normally only the first line and the line below is needed for most verbs.
Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory] [,vOperation]
[,vShow])
 
D

David Trimboli

!!

Or maybe I was out sick and haven't had a chance to try anything
out...

David
Stardate 6296.3

Al Dunbar said:
Maybe not. Maybe he just forgot to thank you...

/Al


"David Candy" <.> wrote in message
Guess I wasted my time with this dickwad.

--
----------------------------------------------------------------------------
----------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
"David Candy" <.> wrote in message
I can tell you the command line for the first dialog you can see.
But that
seems to be it. A briefcase is a ordinary folder with two files in
it.

This code can do it. As it is it enumerates every command. For me
Update All
is 2. So
' objItemVerbs.item(2).doit

will do it if you run the rest of the code. There may be a simplier
way -
see underneath this way (I'll let you experiment).


set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David
Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A & vbcrlf & i
' objItemVerbs.item(i).doit
i = i + 1
Next

Or Try these two ways

Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"


'This line on are comments only
'Note if a letter is underlined you must insert an ampersand before
it.
'Normally only the first line and the line below is needed for most
verbs.
Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory] [,vOperation]
[,vShow])

--
----------------------------------------------------------------------------
----------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
To temporarily deal with a network slowness issue, we've set up a
user
with a briefcase to work locally, and to synchronize with his
network
files when he's done. (We're not using Offline Files because he's
not
actually going offline.)

I thought it would help if I could find a way to synchronize the
briefcase automatically, either as a logon and logoff script or as
a
Scheduled Task. Some searching on the Internet leaves me little
hope
that there is a way to do this: others have asked, but I have found
no
responses.

Does anyone here know of a way to script the synchronization of a
briefcase?

David
Stardate 6276.9
 
D

David Trimboli

Okay, I see what this is doing now (I'm not very famliar with the
Shell object). Strangely, it's not coming up with Update All as any of
the verbs items when run against a briefcase.

David
Stardate 6296.4



"David Candy" <.> wrote in message
I can tell you the command line for the first dialog you can see. But
that seems to be it. A briefcase is a ordinary folder with two files
in it.

This code can do it. As it is it enumerates every command. For me
Update All is 2. So
' objItemVerbs.item(2).doit

will do it if you run the rest of the code. There may be a simplier
way - see underneath this way (I'll let you experiment).


set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David
Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A & vbcrlf & i
' objItemVerbs.item(i).doit
i = i + 1
Next

Or Try these two ways

Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"


'This line on are comments only
'Note if a letter is underlined you must insert an ampersand before
it.
'Normally only the first line and the line below is needed for most
verbs. Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory] [,vOperation]
[,vShow])
 
D

David Candy

I changed Msgbox to wscript.echo

C:\Program Files\Support Tools>cscript "C:\Documents and Settings\sktop\New Text Document ().vbs"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved

&Open
0
&Update All
2
Cu&t
4
Create &Shortcut
6
Rena&me
8


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
Okay, I see what this is doing now (I'm not very famliar with the
Shell object). Strangely, it's not coming up with Update All as any of
the verbs items when run against a briefcase.

David
Stardate 6296.4



"David Candy" <.> wrote in message
I can tell you the command line for the first dialog you can see. But
that seems to be it. A briefcase is a ordinary folder with two files
in it.

This code can do it. As it is it enumerates every command. For me
Update All is 2. So
' objItemVerbs.item(2).doit

will do it if you run the rest of the code. There may be a simplier
way - see underneath this way (I'll let you experiment).


set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David
Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A & vbcrlf & i
' objItemVerbs.item(i).doit
i = i + 1
Next

Or Try these two ways

Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"


'This line on are comments only
'Note if a letter is underlined you must insert an ampersand before
it.
'Normally only the first line and the line below is needed for most
verbs. Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory] [,vOperation]
[,vShow])

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
To temporarily deal with a network slowness issue, we've set up a
user
with a briefcase to work locally, and to synchronize with his
network
files when he's done. (We're not using Offline Files because he's
not
actually going offline.)

I thought it would help if I could find a way to synchronize the
briefcase automatically, either as a logon and logoff script or as a
Scheduled Task. Some searching on the Internet leaves me little hope
that there is a way to do this: others have asked, but I have found
no
responses.

Does anyone here know of a way to script the synchronization of a
briefcase?

David
Stardate 6276.9
 
D

David Candy

Choosing verbs this way crashes scripts on some objects. So testing is needed for each case.,

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
"David Candy" <.> wrote in message I changed Msgbox to wscript.echo

C:\Program Files\Support Tools>cscript "C:\Documents and Settings\sktop\New Text Document ().vbs"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved

&Open
0
&Update All
2
Cu&t
4
Create &Shortcut
6
Rena&me
8


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
Okay, I see what this is doing now (I'm not very famliar with the
Shell object). Strangely, it's not coming up with Update All as any of
the verbs items when run against a briefcase.

David
Stardate 6296.4



"David Candy" <.> wrote in message
I can tell you the command line for the first dialog you can see. But
that seems to be it. A briefcase is a ordinary folder with two files
in it.

This code can do it. As it is it enumerates every command. For me
Update All is 2. So
' objItemVerbs.item(2).doit

will do it if you run the rest of the code. There may be a simplier
way - see underneath this way (I'll let you experiment).


set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David
Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A & vbcrlf & i
' objItemVerbs.item(i).doit
i = i + 1
Next

Or Try these two ways

Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"


'This line on are comments only
'Note if a letter is underlined you must insert an ampersand before
it.
'Normally only the first line and the line below is needed for most
verbs. Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory] [,vOperation]
[,vShow])

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
To temporarily deal with a network slowness issue, we've set up a
user
with a briefcase to work locally, and to synchronize with his
network
files when he's done. (We're not using Offline Files because he's
not
actually going offline.)

I thought it would help if I could find a way to synchronize the
briefcase automatically, either as a logon and logoff script or as a
Scheduled Task. Some searching on the Internet leaves me little hope
that there is a way to do this: others have asked, but I have found
no
responses.

Does anyone here know of a way to script the synchronization of a
briefcase?

David
Stardate 6276.9
 
D

David Trimboli

Let me show you what I get. I created a new briefcase on my desktop,
opened it, dragged a new text file from My Documents into the
briefcase, then closed it. The script is on the desktop and called
listcommands.vbs, and has appropriate paths changed. Then I did this:


=============================
C>dir "New Briefcase"
Volume in drive C is Windows XP
Volume Serial Number is F834-F0D1

Directory of C:\Documents and Settings\trimboli\Desktop\New Briefcase

04/19/2006 09:36 AM <DIR> .
04/19/2006 09:36 AM <DIR> ..
04/18/2006 09:40 AM 0 New Text Document.txt
1 File(s) 0 bytes
2 Dir(s) 13,726,842,880 bytes free

C>listcommands
&Open
0
Scan with Sophos Anti-&Virus
2
Add to &Zip
4
Cu&t
6
Create &Shortcut
8
Rena&me
10

C>
============================


Somehow, I don't have Update All as an option this way, although the
briefcase is functioning normally.

David
Stardate 6298.6


"David Candy" <.> wrote in message
I changed Msgbox to wscript.echo

C:\Program Files\Support Tools>cscript "C:\Documents and
Settings\sktop\New Text Document ().vbs"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved

&Open
0
&Update All
2
Cu&t
4
Create &Shortcut
6
Rena&me
8


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
Okay, I see what this is doing now (I'm not very famliar with the
Shell object). Strangely, it's not coming up with Update All as any
of
the verbs items when run against a briefcase.

David
Stardate 6296.4



"David Candy" <.> wrote in message
I can tell you the command line for the first dialog you can see.
But
that seems to be it. A briefcase is a ordinary folder with two files
in it.

This code can do it. As it is it enumerates every command. For me
Update All is 2. So
' objItemVerbs.item(2).doit

will do it if you run the rest of the code. There may be a simplier
way - see underneath this way (I'll let you experiment).


set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David
Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A & vbcrlf & i
' objItemVerbs.item(i).doit
i = i + 1
Next

Or Try these two ways

Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"


'This line on are comments only
'Note if a letter is underlined you must insert an ampersand before
it.
'Normally only the first line and the line below is needed for most
verbs. Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory] [,vOperation]
[,vShow])

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
To temporarily deal with a network slowness issue, we've set up a
user
with a briefcase to work locally, and to synchronize with his
network
files when he's done. (We're not using Offline Files because he's
not
actually going offline.)

I thought it would help if I could find a way to synchronize the
briefcase automatically, either as a logon and logoff script or as
a
Scheduled Task. Some searching on the Internet leaves me little
hope
that there is a way to do this: others have asked, but I have found
no
responses.

Does anyone here know of a way to script the synchronization of a
briefcase?

David
Stardate 6276.9
 
D

David Candy

What does your right click menu says.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
Let me show you what I get. I created a new briefcase on my desktop,
opened it, dragged a new text file from My Documents into the
briefcase, then closed it. The script is on the desktop and called
listcommands.vbs, and has appropriate paths changed. Then I did this:


=============================
C>dir "New Briefcase"
Volume in drive C is Windows XP
Volume Serial Number is F834-F0D1

Directory of C:\Documents and Settings\trimboli\Desktop\New Briefcase

04/19/2006 09:36 AM <DIR> .
04/19/2006 09:36 AM <DIR> ..
04/18/2006 09:40 AM 0 New Text Document.txt
1 File(s) 0 bytes
2 Dir(s) 13,726,842,880 bytes free

C>listcommands
&Open
0
Scan with Sophos Anti-&Virus
2
Add to &Zip
4
Cu&t
6
Create &Shortcut
8
Rena&me
10

C>
============================


Somehow, I don't have Update All as an option this way, although the
briefcase is functioning normally.

David
Stardate 6298.6


"David Candy" <.> wrote in message
I changed Msgbox to wscript.echo

C:\Program Files\Support Tools>cscript "C:\Documents and
Settings\sktop\New Text Document ().vbs"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved

&Open
0
&Update All
2
Cu&t
4
Create &Shortcut
6
Rena&me
8


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
Okay, I see what this is doing now (I'm not very famliar with the
Shell object). Strangely, it's not coming up with Update All as any
of
the verbs items when run against a briefcase.

David
Stardate 6296.4



"David Candy" <.> wrote in message
I can tell you the command line for the first dialog you can see.
But
that seems to be it. A briefcase is a ordinary folder with two files
in it.

This code can do it. As it is it enumerates every command. For me
Update All is 2. So
' objItemVerbs.item(2).doit

will do it if you run the rest of the code. There may be a simplier
way - see underneath this way (I'll let you experiment).


set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David
Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A & vbcrlf & i
' objItemVerbs.item(i).doit
i = i + 1
Next

Or Try these two ways

Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"


'This line on are comments only
'Note if a letter is underlined you must insert an ampersand before
it.
'Normally only the first line and the line below is needed for most
verbs. Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory] [,vOperation]
[,vShow])

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
To temporarily deal with a network slowness issue, we've set up a
user
with a briefcase to work locally, and to synchronize with his
network
files when he's done. (We're not using Offline Files because he's
not
actually going offline.)

I thought it would help if I could find a way to synchronize the
briefcase automatically, either as a logon and logoff script or as
a
Scheduled Task. Some searching on the Internet leaves me little
hope
that there is a way to do this: others have asked, but I have found
no
responses.

Does anyone here know of a way to script the synchronization of a
briefcase?

David
Stardate 6276.9
 
D

David Candy

There is an error in the code where it does just even numbers. Delete the line i=i+1 as that was left over from another control structure that used to be there.

As you can see your AV program makes it a different verb to me.

set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David Candy\Desktop\New Briefcase")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
wscript.echo A & vbcrlf & i
' objItemVerbs.item(i).doit
Next
======================================
To use the code sunstitute below for above (which lists verbs)
======================================
For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
If A = "&Update All" then
objItemVerbs.item(i).doit
Exit For
End If
Next


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
"David Candy" <.> wrote in message What does your right click menu says.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
Let me show you what I get. I created a new briefcase on my desktop,
opened it, dragged a new text file from My Documents into the
briefcase, then closed it. The script is on the desktop and called
listcommands.vbs, and has appropriate paths changed. Then I did this:


=============================
C>dir "New Briefcase"
Volume in drive C is Windows XP
Volume Serial Number is F834-F0D1

Directory of C:\Documents and Settings\trimboli\Desktop\New Briefcase

04/19/2006 09:36 AM <DIR> .
04/19/2006 09:36 AM <DIR> ..
04/18/2006 09:40 AM 0 New Text Document.txt
1 File(s) 0 bytes
2 Dir(s) 13,726,842,880 bytes free

C>listcommands
&Open
0
Scan with Sophos Anti-&Virus
2
Add to &Zip
4
Cu&t
6
Create &Shortcut
8
Rena&me
10

C>
============================


Somehow, I don't have Update All as an option this way, although the
briefcase is functioning normally.

David
Stardate 6298.6


"David Candy" <.> wrote in message
I changed Msgbox to wscript.echo

C:\Program Files\Support Tools>cscript "C:\Documents and
Settings\sktop\New Text Document ().vbs"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved

&Open
0
&Update All
2
Cu&t
4
Create &Shortcut
6
Rena&me
8


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
Okay, I see what this is doing now (I'm not very famliar with the
Shell object). Strangely, it's not coming up with Update All as any
of
the verbs items when run against a briefcase.

David
Stardate 6296.4



"David Candy" <.> wrote in message
I can tell you the command line for the first dialog you can see.
But
that seems to be it. A briefcase is a ordinary folder with two files
in it.

This code can do it. As it is it enumerates every command. For me
Update All is 2. So
' objItemVerbs.item(2).doit

will do it if you run the rest of the code. There may be a simplier
way - see underneath this way (I'll let you experiment).


set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and Settings\David
Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A & vbcrlf & i
' objItemVerbs.item(i).doit
i = i + 1
Next

Or Try these two ways

Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"


'This line on are comments only
'Note if a letter is underlined you must insert an ampersand before
it.
'Normally only the first line and the line below is needed for most
verbs. Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory] [,vOperation]
[,vShow])

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
To temporarily deal with a network slowness issue, we've set up a
user
with a briefcase to work locally, and to synchronize with his
network
files when he's done. (We're not using Offline Files because he's
not
actually going offline.)

I thought it would help if I could find a way to synchronize the
briefcase automatically, either as a logon and logoff script or as
a
Scheduled Task. Some searching on the Internet leaves me little
hope
that there is a way to do this: others have asked, but I have found
no
responses.

Does anyone here know of a way to script the synchronization of a
briefcase?

David
Stardate 6276.9
 
D

David Trimboli

Ah, now that's the key, isn't it? I just checked, and Update All
doesn't appear in the briefcase's context menu! So naturally, this
approach won't show a verb for Update All.

I just checked on other computers and operating systems (98, NT, 2000
on other computers, XP on Virtual PC), and the briefcase context menu
does display Update All. This is obviously a problem with my computer
or, more likely, some piece of software I have installed. I can get
around this by working on the virtual machine.

Thanks for the lead into the Shell object and verbs.

David
Stardate 6301.5

"David Candy" <.> wrote in message
What does your right click menu says.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
Let me show you what I get. I created a new briefcase on my desktop,
opened it, dragged a new text file from My Documents into the
briefcase, then closed it. The script is on the desktop and called
listcommands.vbs, and has appropriate paths changed. Then I did
this:


=============================
C>dir "New Briefcase"
Volume in drive C is Windows XP
Volume Serial Number is F834-F0D1

Directory of C:\Documents and Settings\trimboli\Desktop\New
Briefcase

04/19/2006 09:36 AM <DIR> .
04/19/2006 09:36 AM <DIR> ..
04/18/2006 09:40 AM 0 New Text Document.txt
1 File(s) 0 bytes
2 Dir(s) 13,726,842,880 bytes free

C>listcommands
&Open
0
Scan with Sophos Anti-&Virus
2
Add to &Zip
4
Cu&t
6
Create &Shortcut
8
Rena&me
10

C>
============================


Somehow, I don't have Update All as an option this way, although the
briefcase is functioning normally.

David
Stardate 6298.6


"David Candy" <.> wrote in message
I changed Msgbox to wscript.echo

C:\Program Files\Support Tools>cscript "C:\Documents and
Settings\sktop\New Text Document ().vbs"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved

&Open
0
&Update All
2
Cu&t
4
Create &Shortcut
6
Rena&me
8


--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
Okay, I see what this is doing now (I'm not very famliar with the
Shell object). Strangely, it's not coming up with Update All as any
of
the verbs items when run against a briefcase.

David
Stardate 6296.4



"David Candy" <.> wrote in message
I can tell you the command line for the first dialog you can see.
But
that seems to be it. A briefcase is a ordinary folder with two
files
in it.

This code can do it. As it is it enumerates every command. For me
Update All is 2. So
' objItemVerbs.item(2).doit

will do it if you run the rest of the code. There may be a simplier
way - see underneath this way (I'll let you experiment).


set objShell = CreateObject("Shell.Application")
set objFolder2 = objShell.Namespace("C:\Documents and
Settings\David
Candy\Desktop\New Folder")
set objFolderItem = objFolder2.Self
set objItemVerbs = objFolderItem.Verbs

For i = 0 to objItemVerbs.count -1
A=objItemVerbs.item(i)
msgbox A & vbcrlf & i
' objItemVerbs.item(i).doit
i = i + 1
Next

Or Try these two ways

Set objShell = CreateObject("Shell.Application")
Set MyComp=objShell.NameSpace(17)
Set CD=MyComp.ParseName("E:\")
Set Context=CD.Verbs
CD.InvokeVerb "E&ject"


'This line on are comments only
'Note if a letter is underlined you must insert an ampersand before
it.
'Normally only the first line and the line below is needed for most
verbs. Eject is different.
'objshell.ShellExecute "e:" ,,,"E&ject"
'object.ShellExecute(sFile [,vArguments] [,vDirectory]
[,vOperation]
[,vShow])

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
David Trimboli said:
To temporarily deal with a network slowness issue, we've set up a
user
with a briefcase to work locally, and to synchronize with his
network
files when he's done. (We're not using Offline Files because he's
not
actually going offline.)

I thought it would help if I could find a way to synchronize the
briefcase automatically, either as a logon and logoff script or as
a
Scheduled Task. Some searching on the Internet leaves me little
hope
that there is a way to do this: others have asked, but I have
found
no
responses.

Does anyone here know of a way to script the synchronization of a
briefcase?

David
Stardate 6276.9
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top