Re: Moving a random file from the server to workstation
- From: "Pegasus \(MVP\)" <I.can@xxxxxxx>
- Date: Thu, 13 Dec 2007 08:16:42 +0100
It will if the Acrobat installation creates an entry in the AppPath
registry key.
"Al Dunbar" <AlanDrub@xxxxxxxxxxxxxxxxxxx> wrote in message
news:u35%23vGVPIHA.4272@xxxxxxxxxxxxxxxxxxxxxxx
"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:eUZ7TkrOIHA.292@xxxxxxxxxxxxxxxxxxxxxxx
Just add a line at the end to invoke Acrobat reader.
"c:\program files\..\...exe" "%Target%\%name%"
Wouldn't this work (i.e. without having to code in the location of the
reader):
start "" "%Target%\%name%"
/Al
"Sylvia" <nospam@xxxxxxxxx> wrote in message
news:edHjwRrOIHA.1204@xxxxxxxxxxxxxxxxxxxxxxx
The PDFs are being moved from the server to the workstation.
The script is meant to be run on the workstaiton. (I modified your
batch file to do this).
I want to open the (moved) file on the workstation.
The script is invoked by human action.
Thanks again.
"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:%23aLbeBrOIHA.5720@xxxxxxxxxxxxxxxxxxxxxxx
You need to provide more details:
- Do the .pdf files reside on the server or on the workstation?
- Is the script meant to run on the server or on the workstation?
- Do you want to open the files on the server or on the workstation?
- How is the script invoked? By the Task Scheduler? By human action?
"Sylvia" <nospam@xxxxxxxxx> wrote in message
news:ucw5m0qOIHA.4688@xxxxxxxxxxxxxxxxxxxxxxx
This is awesome. The only thing it did not do is open the PDF that it
moved. Anyway of adding that in easily?
"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:OnvOwVqOIHA.6108@xxxxxxxxxxxxxxxxxxxxxxx
"Sylvia" <nospam@xxxxxxxxx> wrote in message
news:uKEzV2pOIHA.4688@xxxxxxxxxxxxxxxxxxxxxxx
I have a shared folder on my server containing a few thousand PDF
files.
I would like to set up a script that would move (so no copy remains)
one of the PDF files (it doesn't matter which one, they will all be
moved eventually using this process) from the server to a specific
folder on the local workstation and opens it.
In other words, I want this script to pick a random PDF file (the
folder will only contain PDFs) from a specific shared folder and
move it to a specific folder on the local workstation.
Does anyone have any suggestions on how to do this?
Thanks,
Glenn
You could use this batch file:
#@echo off
#set Source=D:\PDF Folder
#set Target=\\SomeMachine\Some Share\Some Folder
#
#for /F %%a in ('dir "%Source%\*.pdf" ^| find /i "file(s)"') do set
count=%%a
#
#set /a pick = 1 + %random% * count / 32767
#for /F "delims=" %%a in ('dir /b /a-d "%Source%" ^| more +%pick%')
do (set name=%%a& goto Move)
#
#:Move
#echo move "%Source%\%name%" "%Target%"
Please note:
- You must remove the # characters. Their only purpose is to
mark the start of each line.
- Do not retype this program - use copy/paste instead.
- Remove the word "echo" in the last line to activate the batch file.
.
- References:
- Moving a random file from the server to workstation
- From: Sylvia
- Re: Moving a random file from the server to workstation
- From: Pegasus \(MVP\)
- Re: Moving a random file from the server to workstation
- From: Sylvia
- Re: Moving a random file from the server to workstation
- From: Pegasus \(MVP\)
- Re: Moving a random file from the server to workstation
- From: Sylvia
- Re: Moving a random file from the server to workstation
- From: Pegasus \(MVP\)
- Re: Moving a random file from the server to workstation
- From: Al Dunbar
- Moving a random file from the server to workstation
- Prev by Date: Re: Moving a random file from the server to workstation
- Next by Date: Re: Need a script to rename a file 1600 times
- Previous by thread: Re: Moving a random file from the server to workstation
- Next by thread: LDAP query returns data in parent domain but not from child domain
- Index(es):
Relevant Pages
|