SET COPIED=successful
FOR /F %%X IN (servers.txt) DO (
copy /Y name.txt "\\%%X\C$\temp\"
IF ERRORLEVEL 1 SET COPIED=not successful
Echo File Copy %COPIED% to %%X >> Logfile.txt
)
@echo Completed.
pause
batch, by default, resolves all variables at the start of the script so anything...
To the OP: Load the driver for the ASMedia controller. It should enable all features for the controller, and it shouldn't break anything. Free forum help comes with no warranty, so good luck!
And some corrections to other posters in this thread:
Port multiplier is only for SATA. SAS has a...
Sounds like you could have been affected by the DNS problems that a number of others are complaining about with netgear routers. It would help to know if you're not actually able to send packets from the LAN to the WAN or if it's some other service failing like DNS.
You can check here for a...
If you're actually trying to move an entire directory tree, you don't need to to move each folder recursively, you just move the top of the tree.
move c:\dir d:\
will move the dir directory and all contents (including subdirs )to the root of a different drive letter
If you're really...
Your formula for calculating the value of the CD is wrong.
// What you are trying to calculate
nextMonthsValue = principle + interest
// How you are calculating the above (I substituted variable names)
nextMonthsValue = principle + (principle*rate)/codTermInMonths * 100
// Seeing as how...
If I understand the question correctly, maybe something like this would work.
=IF(NOT(ISBLANK(A1)),A1,"")
If the source cell is not empty, use it's value. Otherwise, make the target cell empty.
Windows puts the MBR on the first hard drive device it sees from the BIOS. The "rest" of the OS can be installed to whichever hard drive you select. When Windows was installed, you likely didn't pick the first device to install the OS to so you ended up with a situation where your MBR was on a...
Open your command window and run the .bat file from there rather than running it by clicking on. The command window will let you see the output.
You need to change your %x to %%x to get this to work in a .bat file.
You can change directory (cd) to the location of the backups before the loop.
Or, you can change the command that the loop is running to include the directory that you want to run the dir command on. See the "backups" path in the modified first line of code below.
FOR /F %%A IN ('dir...
It seems like robocopy is overkill for this situation when all you really want to do is sort your files by date.
Use dir with the appropriate flags to sort the files in the directory, then move it rather than copy it. It will take care of you needing to remove it in the next step.
Here's a...
I had a similar issue with my Netgear router that when the bandwidth monitoring was turned on, after a few days everything would fail except the internal switch (no routing, no DNS, no web management console, but IP switching still happened).
I tracked it down by resetting to factory...
If your only goal is to delete the files, then pulling the data from the database one-by-one and creating individual delete commands will probably work.
If you also need to understand the difference between what you're deleting vs. what you're not deleting, what exists on the filesystem vs...
The error makes it appear that the command in file 2 "cug" is throwing the error.
Specifically, this line appears to be causing problems:
NET LOCALGROUP /ADD %1
To troubleshoot batch files, it is useful to enable full echo so you can see every command that is run, print the command...
Your access denied error is probably not related to the move-item command and more to do with your environment.
Try running the powershell script as Administrator you're running the script directly, or if you're running from a command prompt make sure that the command prompt is running as...
Maybe I don't understand what you're trying to accomplish, but I used move-item and it did what you seem to want to do.
move-item -path c:\LEV1 -destination d:\DESTLEV1
resulted in
d:\DESTLEV1\LEV1\
d:\DESTLEV1\LEV1\FOLDER A
d:\DESTLEV1\LEV1\FOLDER A\file.txt...
The eSATA spec calls for a maximum cable length of 2 meters. That's about 6.5 feet.
I think it's likely that the poor signal across your long cable caused the hard drives to think they were having problems and mark sectors as bad. If you get new hard drives, I'd recommend you also rearrange...
First off, I just want to say thanks for the awesome contest.
I'd like to enter for one of the Steam games.
Directions (All of these must be done):
- Tell me what game(s) you would choose if you won.
Right now, I'm looking at Portal 2 and Counterstrike: GO. I've also got friends that are...
I have done very little with powershell, which is why I'm looking to see what you're doing here. Please excuse my ignorance if this is all handled somehow.
Hope you don't mind if I bug you with a few questions and observations...
Why did you chose to do a copy-item followed by remove-item...
I'm not familiar with prnmngr.vbs, so I can't comment on what it's looking for, but it sounds like you're not running the command you want to be running.
Assuming the batch file is doing something wrong with your command, you should echo the command to the screen or to a file to see what...
If your data is important, I'd recommend working with Iomega support first.
In the firmware update release notes I see things about improving RAID functions and adding support for hard drive firmware updates. It's possible that a firmware update may solve your problems, depending on which...
You can specify filenames with the asterisk wildcard. In your example, this would be
copy ~TMP*.exe c:\dest\
As an alternative, you can pipe commands to find if you want to find the specific instances of strings within the output of commands.
dir | find /i "~TMP"
Only have a few minutes but you could do something like this:
reg query key /v keyname | find /i "reg sz 0"
IF NOT %ERRORLEVEL%==0 call :run_reg_key
errorlevel should be 0 if a match was found and 1 if no match was found
Ah, I think that helps a lot.
So it sounds like you have a bunch of files bob*.txt, sam*.txt, etc and the last characters are the filename are a date. You would like to sort those groups of named files by the date at the end of the file and you are struggling with how to extract the date...
Let me start by saying I'm not totally clear on which piece you're struggling with.
Are you trying to copy files based on two key variables, some leading piece "bob" and a certain date at the end of the file with noncernables in the middle?
You could do:
copy bob*05-02-2011.txt
It...
Windows Storage Server can do single instance storage. It's deduplication done at the file level, as opposed to the lower-level approaches of taking portions of a file or even individual blocks.
I wanted to try it out and see how well it worked, but I never quite got that far...
This is correct. You must use a GPT partition instead to access more than 2TB. However, your issue is further complicated by the fact that this is your boot drive. Windows does not support booting from GPT partitions using the BIOS. You must switch your system to UEFI instead (if the hardware...
The point this is making is that this controller is able to enumerate up to 96 devices, provided that you manage to connect them all. SAS expanders make this entirely possible.
Cogman's solution might be on the right track, but it's lacking the directory traversal piece.
Use a for loop with the 'dir /s/b /a:d' command to get the dirs and subdirs then run the copy path\*.foo to path\*.fop and you're good to go.
I'd swear there was a better way to do the directory...
I only have a few minutes to look at this now, but the first thing I see is that your for loops might be broken.
FOR /F "tokens=3" %%i IN (text1.txt) DO Echo >>Groups1.txt %%i
FOR /F "tokens=1" %%f IN (text1.txt) DO Echo >>Users1.txt %%f
You're writing token 1 (%%i) to groups1.txt and...
So, some pseudocode for the process you're trying to do would look like this:
FOR each directory that exists under documents and settings\
copy this directory to somewhere else
That's a relatively simple batch file.
for /f %%A in ('dir /a:d /b "c:\documents and settings\"') DO (...
Not sure if I totally understand the problem as I've never used handbrake.
So let me sum it up what I think you're saying isn't working and see if I've got it. You're building the xml file named movie.queue. To do that, you're using code like this:
echo " <stuff>"
The problem...
Getting software that will run as a service is a much nicer solution, and even your task scheduler option is better than what I'm going to list below:
As an alternative you can setup the machine to autologin by modifying registry keys:
Under the registry key HKLM\SOFTWARE\Microsoft\Windows...
Once you've replaced the network cables, you're not going to see any significant improvement because of the poor write speeds on your disk array. Not to say that there wasn't a network cable problem there, but it is not the only problem.
I'm not very familiar with highpoint products, but you...
I'm not going to disagree about the cables because I know better.
An additional problem that I see is that your server disk system can only write 16MB/sec. I'm guessing you're doing a Windows software RAID5 with those low numbers. This disk performance would be very closely inline with the...
You can get the contents from the registry using reg query, manipulate the string through your script, then update value with a reg add.
One issue to be aware of is that the OS does not realize the value has been modified so it does not issue an event to the shell to reload the contents of...
The problem is in the syntax of your for loop.
If you do a dir /b path then you can see folders with spaces and all sorts of names in them showing that the dir command is working correctly.
If you put the for loop around it and put echo %%V after do then you see that the path is getting...
you could try doing something with the start command and specifying the run directory.
start /dE:\Video\Video1\ /wait encode.bat
With the wait flag, it should have a similar effect as doing a call. Just do the same thing for each batch file and modify the path and script name as...
The code as written should be syntactically correct. It may not do everything you need, but it should get you started.
Where you put it in your code is pretty much up to you depending on your coding/formatting style and how you will use it. Batch scripts have a very limited use of scope in...
If the .bat file is giong to be stored on the flash drive and run from there, you can just capture the .bat file from the %0 argument which is the path and filename of the script.
REM Capture the drive letter from the %0 variable
set my_drive=%~d0
REM Change the drive letter...
I like these.
Dell sells the same thing but calls it the RD1000. It's a 2.5" drive in a plastic "cartridge" shell, and there's a USB or internal slot to insert them. The RD1000 drive is relatively cheap, but the cartridges get spendy.
As long as your backup app supports them, they work...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.