VB Script copy old files with Dir Struct

Get help on programming - C++, Java, Delphi, etc.
Post Reply
SBSP
Registered User
Posts: 3124
Joined: 09 May 2006, 02:00
Location: Centurion

VB Script copy old files with Dir Struct

Post by SBSP »

Hey.

Now lets see, if anyone can help.

I have a serious problem with space on our server.
This is what i need want to do.

Copy all files with their original directory structure from the root of a drive
to a different PC then archive it and burn to DVD.

I cant find software that allows you to do this.
So i'm thinking of creating a VB script to do this.

Now where do i start?
First i will need to find out how to get a directory structure and create a skeleton path and then transfer all the files from source to dest.

Things to keep in ming when creating the directory structure,.
As you know i cant create \Folder1\Folder2 if folder \Folder1 dont exist?

Sure i can find code somewhere using google read directories from its root to
the last folder in a loop but how will i go about creating parent folders first.

I need some clever, idea
xumwun
Registered User
Posts: 133
Joined: 14 Apr 2006, 02:00
Contact:

Post by xumwun »

try xcopy in a command prompt or batch file, no need for vbscript
SBSP
Registered User
Posts: 3124
Joined: 09 May 2006, 02:00
Location: Centurion

Post by SBSP »

xcopy can only copy newer file not older files.

I forgot to mention i would like to copy all old files
lets say year 2004 (Last accessed) and older.
viceroy
Registered User
Posts: 3565
Joined: 27 Mar 2006, 02:00
Location: I forget

Post by viceroy »

Would this be what you're looking for?
Image
SBSP
Registered User
Posts: 3124
Joined: 09 May 2006, 02:00
Location: Centurion

Post by SBSP »

viceroy wrote:Would this be what you're looking for?
:P :P :P :P :P :P :P :P
viceroy
Registered User
Posts: 3565
Joined: 27 Mar 2006, 02:00
Location: I forget

Post by viceroy »

Glad I could help :)
Image
SBSP
Registered User
Posts: 3124
Joined: 09 May 2006, 02:00
Location: Centurion

Post by SBSP »

I found this as well

http://www.microsoft.com/technet/techne ... Spotlight/

Its a GUI for robo copy


Or in a batch file

cd C:\tools
robocopy E:\ Y:\ /MIR /MINAGE:20031231
pause

If anyone is ever interested

Thanks Vice
Post Reply