ha one more funky thing:
C:\Users\username\AppData\Local\Microsoft\Outlook\Backup\AppData\Local\Microsoft\Outlook\Backup\AppData\Local\Microsoft\Outlook
is now the new backup location
otherwise this is working perfectly (removes the OST/PST file from original source)
Search found 19 matches
- 27 Mar 2013 09:45
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
- 26 Mar 2013 19:27
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
This was convoluted - I think I got it right. It removes the \users\username\ @echo off for %%a in ("%userprofile%") do ( for /f "delims=" %%b in ('dir "%%~dpa" /ad /b') do ( pushd "%%~dpa\%%b" for /f "delims=" %%c in ('dir *.ost *.pst /a-d /b /s 2^...
- 26 Mar 2013 17:27
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
awesome it appears to be copying properly. One more caveat : The end location for the files is : c:\users\username\appdata\local\microsoft\Outlook\Backup\Users\username Is there a way to eliminate the trailing \Users\username since the folder we're saving to should already be in that user's profile?...
- 26 Mar 2013 17:08
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
foxidrive wrote:It occurs to me that if any *.pst *.ost files exist in hidden account folders then they will probably not be moved.
Yeah the AppData folder is going to be hidden for sure.
- 26 Mar 2013 17:03
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
getting an error 'c:\users\\ALL' is not a recognized command 'c:\users\\default' is not a recognized command then The system cannot find the path specified. Assuming that there's a phantom \ somewhere but I don't see where it'd be; it seems to be effecting each line though. The code completes really...
- 26 Mar 2013 16:46
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
Also, thanks for spending time on this, I realize that I've got 'ID 10 T' written on my forehead at this point...
- 26 Mar 2013 16:36
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
I'll be remote executing with either PSEXEC or elevated admin prompt, haven't decided on that yet. Users will probably be logged in; however, before the script is called, I have a VBS running that closes the Outlook process and unlocks any files that could be locked prior to the transfer and waits f...
- 26 Mar 2013 16:28
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
I meant are the filenames of the files to save unique. If they have archive files then they could have filename clashes, unless directory structure is copied. That then leads to cyclic copy errors, unless a staging folder can be used to back it all up to and move the staging folder later. I just re...
- 26 Mar 2013 16:17
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
I went ahead and tried executing the new code which seems to work. It's still giving a lot of 'file not found' for the *.*st when it can't find the files in the profile it's looking in, but it IS copying over the .pst file where it does exist. I'm just hoping to trim the log file down by looping th...
- 26 Mar 2013 16:11
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
I went ahead and tried executing the new code which seems to work. It's still giving a lot of 'file not found' for the *.*st when it can't find the files in the profile it's looking in, but it IS copying over the .pst file where it does exist. I'm just hoping to trim the log file down by looping the...
- 26 Mar 2013 16:06
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
Here's what I've come up with, need syntax check if anyone is good with it: for /f "delims=" %%z in ('dir "%systemdrive%\users\" /ad /b') SET "target=%systemdrive%\users\%%z\AppData\Local\Microsoft\Outlook\Backup\" for /f "delims=" %%a in ('dir c:\*.pst /b /s...
- 26 Mar 2013 16:00
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
Each user has a unique name. Most users only use 1 pst or ost file, but some have archive.pst files to save as well.
- 26 Mar 2013 15:52
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
Do you expect your users to have their files in their user profile? Yes - all users will have their files in user profile under the specific path - and we're creating the backup within the default file location for their PST/OST file. I actually plan on changing the script to MOVE the files rather ...
- 26 Mar 2013 15:18
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
Here's what I've come up with, need syntax check if anyone is good with it: for /f "delims=" %%z in ('dir "%systemdrive%\users\" /ad /b') SET "target=%systemdrive%\users\%%z\AppData\Local\Microsoft\Outlook\Backup\" for /f "delims=" %%a in ('dir c:\*.pst /b /s ...
- 26 Mar 2013 15:11
- Forum: DOS Batch Forum
- Topic: For loop to hit each user on a machine
- Replies: 33
- Views: 22458
Re: For loop to hit each user on a machine
OK cool, I think I have enough info to go on here. Thanks!