File copy script
Not sure if this is the correct forum for this but here it goes.
I need to write a script that will copy files from a folder into another folder without overwriting any existing files. There will be multiple extensions...about 5 or so different file types to copy. Actually I may be able to copy all files from the folder (*.*) or something. There will often be 50k + files being copied, this is the main reason I would like to be able to only copy files that are not already existing.
I am running solaris 8 & 9.
Thanks,
Well, have you tried reading the man-page yet? Because that gives you a huge amount of examples :)
rsync -auv --ignore-existing /export/home/test1/ /opt/XRXnps/test2
Similar Messages
-
Hi
Im a beginner and this is a basic vb script to copy a file from a network location. This works sometimes but fails at times with error " File not Found" . I don't understand why it should fail sometimes.
The below is the code.
Function Main()
dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
set f = fso.getfile("\\servername\X$\jobs\my file copy.mdb")
f.delete
set f = fso.getfile("\\servername\my-folder$\my data\access files\folder\Databases\my file.mdb")
f.copy ("\\servername\X$\jobs\my file Copy.mdb")
set fso = nothing
Main = DTSTaskExecResult_Success
End FUNCTION
Mli.a | Mark the answers if it helps to solve your problem |For SQL server ActiveX scripts you need to post in the MSSQLServer developers form or the SSIS forum. Are you running this under DTS or SSIS. Some controls are not allowed under SSIS.
The scripts wil work as a VBS so test them as a VBS first.
The account running SSIS/DTS does nto have access to shares or Admin shares so this will likely never work.
The error say you are using parenthesis and you cannot when calling a sub so the code posted is not what you are running.
Function Main()
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "\\servername\my-folder$\my data\access files\folder\Databases\my file.mdb", "\\servername\X$\jobs\my file copy.mdb",True
Main = DTSTaskExecResult_Success
End Function
Be sure you are set to run VBScript and not Jscript.
¯\_(ツ)_/¯ -
Re Trim file name scripts in SL
Below is a frozen, unanswered conversation regarding the missing finder scripts in SL. Luckily, I make a complete backup before converting, so I still have all the old Leopard scripts. Norwichfan, I feel your pain, and I thought that archiving your thread without an adequate answer was wrong.
Here's your answer. you can just get a copy of the old finder scripts, put them in /Library/Scripts and they'll show up in your script menu as before. I have zipped up a copy of them and posted them here:
http://tedward.org/finder_scripts.zip
norwichfan88
Posts: 12
From: Australia
Registered: Mar 25, 2010
Trim file name scripts in SL
Posted: Mar 26, 2010 6:26 PM
I have recently upgraded to SL and have found that the trim/add to file name applescripts from leopard are missing from my scripts menu.
Is there a place I can find these for SL?
MBP mid-2009 Mac OS X (10.6.2)
Pierre L.
Posts: 824
From: Québec
Registered: Jan 26, 2009
Re: Trim file name scripts in SL
Posted: Mar 26, 2010 6:49 PM in response to: norwichfan88
Solved
Maybe something similar in this web page?
15-inch MacBook Pro 2.53 GHz Mac OS X (10.6.2) AirPort Extreme
norwichfan88
Posts: 12
From: Australia
Registered: Mar 25, 2010
Re: Trim file name scripts in SL
Posted: Apr 10, 2010 12:03 AM in response to: Pierre L.
Thanks for the web page, had a look but not having done any work with applescript or other programming language was a bit over my head.
I decided to make a temporary solution with and automator action.
MBP mid-2009 Mac OS X (10.6.2)Thanks for the web page, had a look but not having done any work with applescript or other programming language was a bit over my head.
I decided to make a temporary solution with and automator action. -
Can't get File.copy(target) to work.
Hi,
I'm writing a script where I want to copy a file to another location after the render has finished, but I can't get the File.copy() method to work.
Here's a snippet of the code:
app.project.renderQueue.render();
var renderedFile = app.project.renderQueue.items[1].outputModules[1].file;
renderedFile.copy("c:\\");
The render works fine and renderedFile.fullName returns the correct path and name, but the actual copying just doesn't work.
I have made sure that scripts are allowed to access files and network.
thanks
Luddenever mind, I solved it.
It wasn't clear to me that I had to specify both target path AND file name.
This works just fine now:
renderedFile.copy("c:\\rendered.mov");
cheers
Ludde -
How to set local file copy buffer size?
Is there any sysctl parameter or any other mechanism to set or change file copy buffer sizes? I'm backing up a huge number of files to a local hard drive connected by firewire, and I'd like to play with file copy buffer sizes for the best performance. The machine used is a new macbook pro running OS-X 10.6.7. Any ideas?
Here is a bash script that uses the dd command to copy a file. Use the -b option to set the file size.
example:
/Users/mac/config/forumcopy.command -vb 4096 /Applications\ \(Mac\ OS\ 9\)/Civilization\ II/Civ\ II\ Map\ Editor /Applications\ \(Mac\ OS\ 9\)/Civilization\ II/Civ\ II\ Map\ Editorv8
I haven't tested this a lot.
Of course, I haven't figured out how best to post code. Trying HTML mode. Using the <pre> tag.
#!/bin/bash
# macteracopy [ -b blocksize ] [-v ] [-V ] input_file output_file
# Purpose of this script:
# Copy a file with optional block size. Default size of 4096.
# Notes:
# chmod u+x macteracopy
# You may have to restart the finder to notice a customized file icon.
# Copyright 2010 rccharles
# GNU General Public License
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# For a copy of the GNU General Public License see
# <http://www.gnu.org/licenses/>.
# debug info
export PS4='+(${BASH_SOURCE}:${LINENO}):'
## not in the tiger version of bash ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
declare -x verbose="No" \
veryVerbose="No"
blockSize=4096
# Check for command-line options used when calling the script
if [ $# -gt 0 ] ; then
while getopts "b:vV" Option ; do
case "${Option}" in
b ) blockSize=$OPTARG
v ) verbose="Yes"
V ) veryVerbose="Yes"
\? ) echo 'usage macteracopy -b blocksize -V input_file output_file'
* ) echo "Unknown argument among arguments $* on command line."
exit 6
esac
done
fi
# We're done with switches / options from the command line
shift $(($OPTIND - 1))
[ "${veryVerbose}" = "Yes" ] \
&& set -x
inputFile="${1}"
outputFile="${2}"
[ "${verbose}" = "Yes" ] \
&& echo \
&& echo "$0 script revised $(GetFileInfo -m $0)" \
&& echo
[ ! -f "${inputFile}" ] && echo "File not found. ${inputFile}" && exit 4
[ -d "${inputFile}" ] \
&& echo "Directories are not supported, yet. ${inputFile}" \
&& exit 4
[ "${veryVerbose}" = "Yes" ] \
&& ulimit -a \
&& df \
&& echo
if [ "${verbose}" = "Yes" ] ; then
dd bs=${blockSize} if="${inputFile}" of="${outputFile}"
dd bs=${blockSize} if="${inputFile}/rsrc" of="${outputFile}/rsrc"
else
dd bs=${blockSize} if="${inputFile}" of="${outputFile}"
dd bs=${blockSize} if="${inputFile}/rsrc" of="${outputFile}/rsrc"
} 2>/dev/null
fi
[ "${verbose}" = "Yes" ] \
&& echo \
&& ls -l "${inputFile}" \
&& ls -l "${inputFile}"/rsrc \
&& GetFileInfo "${inputFile}" \
&& ls -l "${outputFile}" \
&& ls -l "${outputFile}"/rsrc \
&& GetFileInfo "${outputFile}" \
&& echo
SetFile -a $(GetFileInfo -a "${inputFile}" ) \
-c $(GetFileInfo -c "${inputFile}" | sed 's/"// g' ) \
-t $(GetFileInfo -t "${inputFile}" | sed 's/"// g' ) \
"${outputFile}"
[ "${verbose}" = "Yes" ] \
&& echo "after SetFile" \
&& GetFileInfo "${outputFile}" -
Group Policy Preferences File Copy - Access is Denied on 2003 but not 2008 R2
Hello,
I have created a GPO which copies a file from a network share into a new folder under Program Files. This policy works just fine on a Windows 2008 box, but not on 2003. I've used "psexec -i -s cmd.exe" to verify system account permission to the
share. I am able to successfully browse and copy files from the share as the system account on both boxes.
However, when the GPO attempts to perform the file copy, it does not work, and generates the following error message:
Event Type: Warning
Event Source: Group Policy Files
Event Category: (2)
Event ID: 4098
Date: 8/28/2013
Time: 3:32:12 PM
User: NT AUTHORITY\SYSTEM
Computer: Server01
Description:
The computer 'file.txt' preference item in the 'TXT File Copy {9176122B-1A50-4AB8-91D9-6E8553727E18}' Group Policy object did not apply because it failed with error code '0x80070005 Access is denied.' This error was suppressed.
I am trying to avoid writing a login script, so I am hoping someone will be able to help me figure out why this works fine on Windows 2008 but not Windows 2003. Please note file names and paths are modified here for security reasons, but the principle is
the same.
My GPO is:
Computer Configuration\Preferences\Windows Settings\Files
File (Target Path: c:\Program Files\path\to\file\file.txt)
Source file: \\share\path\to\file\file.txt
Destination File: c:\program files\path\to\file\file.txt
Action: Update
Suppress errors on individual file actions: Disabled
Read-Only: Enabled
Hidden: Disabled
Archive: Enabled
Stop Processing items on this extension if an error occurrs on this item: No
Remove this item when it is no longer applied: No
Apply once and do not reapply: No
Item-level Targeting: None
ThanksAs a user, I am able to browse the share just fine using the alias. It is only when I try to access the share using the system account that I encounter a problem.
experiencing the exact same symptoms. in the tests below, server, client1, and client2 are all are native instances of microsoft windows server.
server: windows server 2008 R2 standard SP1
client1: windows server 2003 standard SP2
client2: windows server 2008 R2 standard SP1
registry setting "DisableLoopbackCheck": unconfigured on server; unconfigured on client1; unconfigured on client2
registry setting "DisableStrictNameChecking": configured as "1" on server; unconfigured on client1; unconfigured on client2
domain user on client1 attempt to access server by name: success
domain user on client1 attempt to access server by alias: success
domain user on client2 attempt to access server by name: success
domain user on client2 attempt to access server by alias: success
local system on client1 attempt to access server by name: success
local system on client1 attempt to access server by alias: failed (system error 5 has occurred. access is denied.)
local system on client2 attempt to access server by name: success
local system on client2 attempt to access server by alias: success
all tests done using "net view \\target", but similar results were seen when using "dir \\target\share" which the domain user and local system account have access to.
the differing behavior between client1 and client 2 suggests that server 2003 requires additional configuration to allow its local system account to access an SMB share by alias.
this problem prevents group policy features (such as software installation) from an aliased file server. -
Photoshop droplets don't work after file.copy();
I wrote a script to backup all of my files in a directory, like this
fileObj = File('~/Desktop/Vendor Swatches.app');
fileObj.copy('~/Desktop/BACKUP/' + fileObj.name);
I noticed that when it copies my Photoshop Droplets, they no longer work. If you look at the attached image, you can see the file before and after copying. The end file is also listed as "Application (Classic)". Does anybody know why this is happening? Or any way to prevent it?
thanks!I don't use File.copy() myself it creates a 'NEW' file which makes it pretty useless to me. My Retrospect back-ups would be never ending. It looks like form your images you are making a copy across from mounted server? From a personal point of view I would have the system do the copy/moving of files… Here are a few functions that may be of use to you… Copying files/folders you could do this with the shells 'cp' or 'ditto'
Using cp…
#target photoshop
var source = Folder.selectDialog('Select a Folder to Copy from?');
var dest = Folder.selectDialog('Select a Folder to Copy to?');
if (source != null && dest != null) {
var res = cpFiles(source, dest);
alert(res);
function cpFiles(sf,df) {
var comm = 'cp ';
var optns = '-R ';
var sPath = "'" + sf.fsName + "/' ";
var dPath = "'" + df.fsName + "'";
var sh = comm + optns + sPath + dPath;
var res = undefined;
var sh = app.system(sh);
!sh ? res = true : res = false;
return res;
And much the same using ditto…
#target photoshop
var source = Folder.selectDialog('Select a Folder to Copy from?');
var dest = Folder.selectDialog('Select a Folder to Copy to?');
if (source != null && dest != null) {
var res = dittoFiles(source, dest);
alert(res);
function dittoFiles(sf,df) {
var comm = 'ditto ';
var optns = '';
var sPath = "'" + sf.fsName + "/' ";
var dPath = "'" + df.fsName + "'";
var sh = comm + optns + sPath + dPath;
var res = undefined;
var sh = app.system(sh);
!sh ? res = true : res = false;
return res;
And as you mentioned back-up… here are a few things you could use before/after your process to store/back-up whichever…
ZIP a folder…
#target photoshop
var source = Folder.selectDialog('Select a Folder to create ZIP From?');
if (source != null) {
var res = makeZIP(source);
alert(res);
function makeZIP(sf) {
var comm = '/usr/bin/ditto ';
// These should be default after 10.4 Tiger?
var optns = '-c -k -rsrc --keepParent ';
var sPath = "'" + sf.fsName + "' ";
var dPath = "'" + sf.fsName + '.zip' + "'";
var sh = comm + optns + sPath + dPath;
var res = undefined;
var sh = app.system(sh);
!sh ? res = true : res = false;
return res;
Disk Image a folder…
#target photoshop
var source = Folder.selectDialog('Select a Folder to create Disk Image From?');
if (source != null) {
var res = makeDiskImage(source);
alert(res);
function makeDiskImage(sf) {
var comm = 'hdiutil create ';
var optns = '-srcfolder ';
var sPath = "'" + sf.fsName + "' ";
var dPath = "'" + sf.fsName + '.dmg' + "'";
var sh = comm + optns + sPath + dPath;
var res = undefined;
var sh = app.system(sh);
!sh ? res = true : res = false;
return res;
And lastly TAR Archive a folder…
#target photoshop
var source = Folder.selectDialog('Select a Folder to create TAR Archive From?');
if (source != null) {
var res = makeTAR(source);
alert(res);
function makeTAR(sf) {
var comm = '/usr/bin/tar ';
var optns = 'cjvf ';
var dPath = "'" + sf.fsName + '.tbz' + "' ";
var sPath = "'" + sf.fsName + "'";
var sh = comm + optns + dPath + sPath;
var res = undefined;
var sh = app.system(sh);
!sh ? res = true : res = false;
return res;
They are for 'mac' and all expect a folder object or two… -
How to alter 'add to file names' script?
I'm working on some stuff that I need to get done today, and it dawned on me that I could save a lot of time if I had a certain script perform a simple task for me. Unfortunately I haven't been able to get one to work right. I just want to be able to add the same thing onto the end of a file name... For instance, 01.jpg would become 01x.jpg, 02.jpg becomes 02x.jpg and so on. The basic 'Add to File Names' script will almost work, but it adds to the front of the name, not the back. Does anyone know how I could alter the lines in that script to get it to do what I want?
Thanks for any help,
Dave01. Under 'Alternative 01:', the line ...
No error checking for folders is included. Such is an exercise for the student.
... should have been ...
--No error checking for folders is included. Such is an exercise for the student.
02. The error message ...
"System Events got an Error: NSCannotCreateScriptCommandError".
Hmmm, those replying are using MacOS X 10.4.x, and you are using MacOS X 10.2.x. Others, with Macs running MacOS X 10.2.x and using AppleScript code from MacOS X 10.3.x and later, do at times experience 'NSCannotCreateScriptCommandError' error messages.
In the code below, 'System Events' was replaced with 'Finder'. Some additional editing was performed, where required.
Alternative 01:
property tAddition : "x" -- The charcter or string to append to the files' name.
tell application "Finder"
set tSelection to selection
--No error checking for folders is included. Such is an exercise for the student.
repeat with i in tSelection -- Cycle through the provided files.
set {displayed_name, name_Extension} to {displayed name of (i as alias), name extension of (i as alias)}
if ((displayed_name ends with name_Extension) and ((count name_Extension) > 0)) then
-- Handle file names which include a name extension.
set (name of i) to ((get (characters 1 through ((count displayed_name) - (count name_Extension) - 1) of displayed_name) as string) & tAddition & "." & name_Extension)
else
set (name of i) to (displayed_name & tAddition) -- Handle file names without a name extension.
end if
end repeat
end tell
Save the AppleScript code as a script.
Move file (or a copy or alias of the file) to the '~/Library/Scripts/' folder.
Select files to be processed, in 'Finder'.
Select the script, via the 'Script menu'.
Alternative 02:
property tAddition : "x" -- The charcter or string to append to the files' name.
on run {} -- User double-click on the applet.
display dialog "Drag file(s) onto applet for processing."
end run
on open selected_Items -- User dragged items onto applet.
my handleitems(selectedItems) -- Processed items dragged onto applet.
end open
on handleitems(localItems)
-- No error checking for folders is included. Such is an exercise for the student.
tell application "Finder"
repeat with i in local_Items -- Cycle through the provided files.
set {displayed_name, name_Extension} to {displayed name of i, name extension of i}
if ((displayed_name ends with name_Extension) and ((count name_Extension) > 0)) then
-- Handle file names which include a name extension.
set (name of i) to ((get (characters 1 through ((count displayed_name) - (count name_Extension) - 1) of displayed_name) as string) & tAddition & "." & name_Extension)
else
set (name of i) to (displayed_name & tAddition) -- Handle file names without a name extension.
end if
end repeat
end tell
end handle_items
Save the AppleScript code as an applet (application).
Drag files to be processed, onto the applet, in 'Finder'. -
I have a multiple file copy I need to do many times in my development and need a script to do this. I don't know if a shell script or applescript would be better for this but here is what i need to do.
I have a file location here:
papa/son/baby.txt
also in the "papa" folder I have several more folders like this:
papa/daughter1/
papa/daughter2/
papa/daughter3/
so the whole thing looks like this:
papa/son/baby.txt
papa/daughter1/baby.txt
papa/daughter2/baby.txt
papa/daughter3/baby.txt
Here are the rules:
1) The file and folder structure within the "papa" folder is fixed and doesn't need to change.
2) No new folders will ever need to be created.
3) The location of the "papa" folders will be different and should therefore be irrelevant in the script.
Script goal:
The script needs to copy the "baby.txt" here:
papa/son/baby.txt
to all of these folders overwriting the existing files of the same name already in these locations:
papa/daughter1/baby.txt
papa/daughter2/baby.txt
papa/daughter3/baby.txt
I would like to either have an automator app to crag the file onto or something in the contextual menu to select for the given file.
How would the script look for this?Dropping files on an Automator application and using a workflow as a service both automatically get the files passed to the workflow, otherwise you would need to include an action to get the items you want to work with.
How are you determining the file/folder locations? You will need to specify the text file and/or a folder location for the copies somewhere in your workflow. If you are wanting to get a text file or base folder and extract the other items from that, a *Run AppleScript* action can be used to do the file path manipulations. -
Hi,
I am using Files.copy() method to copy a file. The exact code is:
Files.copy(sourcePath, targetPath, StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOption.REPLACE_EXISTING);
However, it won't copy the UAC attributes on Windows. If I create a file with elevated access on Windows, the created files cannot be deleted/modified in Java with an non-elevated session for the same user account. I want to copy a file so that the elevation attributes get copied as well but the above code does not do that.
Thanks.
Imran.Resolved!
I used the following script and it worked like a charm.
On Error Resume Next
'DECLARE VARIABLES HERE
Dim fso
Dim oFolder1, objFolder, oFolder
Dim path
Dim WSHShell
Dim colFolders
Dim sDocsAndSettings
Dim strComputer
strComputer = "."
Set WSHShell = CreateObject("WScript.Shell")
Set fso = createobject("Scripting.FileSystemObject")
'SPECIFY THE PATH OF THE FOLDER IN WHICH SOURCE FILES RESIDE
oFolder1 = fso.GetParentFolderName(WScript.ScriptFullName)
If Right(oFolder1, 1) <> "\Macromedia" Then oFolder1 = oFolder1 & "\Macromedia"
'COPY FILES TO USER PROFILES
sDocsAndSettings = "C:\Users\"
Set colFolders = fso.GetFolder(sDocsAndSettings)
For Each oFolder In colFolders.SubFolders
Select Case LCase(oFolder.Name)
Case "admin", "administrator", "newuser", "all users", "default user", "default user.original", "localservice", "networkservice"
'LEAVE THE DEFAULT PROFILES ON THE MACHINE
Case Else
' Check for the path
If fso.FolderExists(sDocsAndSettings & oFolder.Name & "\AppData\Roaming") Then
'COPY FOLDER TO USER PROFILE
fso.CopyFolder oFolder1, sDocsAndSettings & oFolder.Name & "\AppData\Roaming\" ,True
'MsgBox "Copied to: " & sDocsAndSettings & oFolder.Name & "\AppData\Roaming"
End If
End Select
Next
Set fso = Nothing
Set WSHShell = Nothing
Thanks, Souvik. -
File copy from shell using nautilus file operations?
Is it possible to have the nautilus file operations copy command from a shell? In other words, rather than using the cp command, I'd like to have a file copy triggered from a bash script that uses the familiar "File Operations" dialog box in nautilus. Can this be done?
Hello Bibin,
Give this a try., if i understood correctly. I coudn't test it my side.
$servers = get-content C:\hosts.txt
foreach ($server in $servers)
if(test-path \\Centralserver\share\$server)
if(test-path \\$server\c$\xxx.file)
Copy -path \\$server\c$\xxx.file -Destination \\CentralServer\share\$server\ -Recurse -ErrorVariable CopyErrorS
#stores all your copy errors
$copyError = $copyError + $copyerrorS
else
Write-Output "source file on server $server is missing"
else
New-Item -Name $server -ItemType Directory -path \\centralserver\share\ -Force -Errorvariabe FCreationErrorS
#Stores all your Folder creation errors
$FCreationError = $FCreationError + $FCreationErrorS
if((test-path \\$server\c$\xxx.file) -and (test-path \\Centralserver\share\$server))
Copy -path \\$server\c$\xxx.file -Destination \\CentralServer\share\$server\ -Recurse -force
else
Write-Output "Error creating source folder on $server."
Regards,
V.
Venu -
I have the latest Airport Extreme with a Seagate drive connected. I copied files to the drive while it was connected to my MacBook Pro. The files do not show up when connected to the AE, but they appear when connected to the Macbook, Files copied over the network to the drive appear. The drive is formatted HFS+.
After playing with this for the last few days, I found a solution. Under the "Disks" tab in Airport Utility, the "Secure Shared Disks" drop down needs to be set to "With device password". Mine was set to "With acounts", which even after correct authentication, none of the files would appear.
Another interesting note: The files that I could see, the ones I copied over the network, do not appear now. I can copy over new files, and they show up, but the ones copied prior to changing the "Secure Shared Disks" option, do not. -
My newsreader is acting funny and dropping posted messages, so I
apologize if this shows up twice.
My comments on the file speed are that the times posted by other just go
to show how difficult it sometimes is to make good timing measurements.
I suspect that the wide variations being posted are in large part to
disk caching. To measure this, you should either flush the caches each
time or run them multiple times to make sure that the cache affects them
more equally.
Here is what I'd expect. The LV file I/O is a thin layer built upon the
OS file I/O. Any program using file I/O will see that smaller writes
have somewhat more overhead than a few large writes. However, at some
size, either LV or the OS will break the larger writes into smaller
ones. The file I/O functions in general will be slower to read and
write contents than making a file copy using the copy node or move node.
Sorry if I can't be more specific, but if you have a task that
seems way to slow, please send it to technical support and report a
performance problem. If we can find a better implementation, we will
try to integrate it.
Greg McKaskleMaybe this is because of the write buffer?
Try mounting the media using the -o sync option to have data written immediately. -
How to measure progress of file copy?
One of the requirements for my AIR application is to copy
large files from one location to another on the client computer.
I've been using the copyToAsync() method in AIR, but unfortunately
this does not trigger progress events. Copying gigabyte files that
take several seconds becomes pretty uncomfortable for users, when
they can't see the progress.
Does anyone know of an alternative or workaround? All I need
to do is copy a file from one location to another, and measure the
progress while that is happening.
Since I control the client machines (it is a closed
environment), I have the option to setup file servers on every
machine and use the file download control with Flash instead of
file copy. However, when I investigate this option it seems that
the file download control will always trigger user interaction to
select the target path (which I don't want -- I want to
programatically select the source files and the target directory).
If someone knows a solution to that problem I would happily take it
and move on :)Hi,
Use 2 FileStream objects in async mode (openAsync). One to
read and another to write. When you read in async mode, you get
progress events. When they fire, you can read bytesAvailable
amounts of data and write that to the output filestream.
The output filestream can listen for output_progress events
to ensure that new data can be written to it or not. -
Hi
I have a couple of issues on our company network.
The first is thate a single large file copy imapcts the entire network and dramatically reduces network speed and the second is that there are periodic outages where file open/close/save operations may appear to hang, and also where programs that rely on
network connectivity e.g. email, appear to hang. It is as though the PC loses it's connection to the network, but the status of the network icon does not change. For the second issue if we wait the program will respond but the wait period can be up to 1min.
The downside of this is that this affects Access databases on our server so that when an 'outage' occurs the Access client cannot recover and hangs permamnently.
We have a Windows Active Directory domain that comprises Windows 2003 R2 (soon to be decommissioned), Windows Server 2008 Standard and Windows Server 2012 R2 Standard domain controllers. There are two member servers: A file server running Windows 2008 Storage
Server and a remote access server (which also runs WSUS) running Windows Server 2012 Standard. The clients comprise about 35 Win7 PC's and 1 Vista PC.
When I copy or move a large file from the 2008 Storage Server to my Win7 client other staff experience massive slowdowns when accessing the network. Recently I was moving several files from the Storage Server to my local drive. The files comprised pairs
(e.g. folo76t5.pmm and folo76t5.pmi), one of which is less than 1MB and the other varies between 1.5 - 1.9GB. I was moving two files at a time so the total file size for each operation was just under 2GB.
While the file move operation was taking place a colleague was trying to open a 36k Excel file. After waiting 3mins he asked me for help. I did some tests and noticed that when I was not copying large files he could open the Excel file immediately. When
I started copying more data from the Storage Server to my local drive it took several minutes before his PC could open the Excel file.
I also noticed on my Win7 client that our email client (Pegasus Mail), which was the only application I had open at the time would hang when the move operation was started and it would take at least a minute for it to start responding.
Ordinarlily we work with many files
Anyone have any suggestions, please? This is something that is affecting all clients. I can't carry out file maintenance on large files during normal work hours if network speed is going to be so badly impacted.
I'm still working on the intermittent network outages (the second issue), but if anyone has any suggestions about what may be causing this I would be grateful if you could share them.
ThanksWhat have you checked for resource usage during one of these copies of a large file?
At a minimum I would check Task Manager>Resource Monitor. In particular check the disk and network usage. Also, look at RAM and CPU while the copy is taking place.
What RAID level is there on the file server?
There are many possible areas that could be causing your problem(s). And it could be more than one thing. Start by checking these things. And go from there.
Hi, JohnB352
Thanks for the suggestions. I have monitored the server and can see that the memory is nearly maxed out with a lot of hard faults (varies between several hundred to several thousand), recorded during normal usage. The Disk and CPU seem normal.
I'm going to replace the RAM and double it up to 12GB.
Thanks! This may help with some other issues we are having. I'll post back after it has been done.
[Edit]
Forgot to mention: there are 6 drives in the server. 2 for the OS (Mirrored RAID 1) and 4 for the data (Striped RAID 5).
Maybe you are looking for
-
Best practices for setting up projects
We recently adopted using Captivate for our WBT modules. As a former Flash and Director user, I can say it's fast and does some great things. Doesn't play so nice with others on different occasions, but I'm learning. This forum has been a great sourc
-
Different due dates for the same SC
Hi dear experts, We are facing a problem with our customer, the customer wants to have the flexibility in the system to create SC´s with 2 different characteristics, the first category are plans which work with the standard and we already have them w
-
My Adobe Premiere Pro: Activation Repair Type Help
My software stopped working 12-16-2013, the dialogue box said that my computer was recently reconfigured. I have not re-configured my computer in the last 7 years. I am still using Windows XP and all my original programs. My activation type says Repa
-
Does "first match" win on Content Filters?
If I define multiple content filters for a given outbound mail policy, would system stop looking at filters once a match is found on one of the content filters or should I force that by using a "final" action in my content filters? I know "first matc
-
Install SAP PI - Error in step 39 - Install Sofware Units
Hi, I am trying the sap xi... but in step 39 of the installation the following error occurs: begin ERROR 2009-07-21 04:12:09.500 FJS-00003 uncaught exception: nw.sdm.deploymentErrorWithLog: SDM deployment failed for at least one of the components to