Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Create a Batch file - Please help !


Create a Batch file - Please help !

Author
Message
John Paul-702936
John Paul-702936
SSC-Enthusiastic
SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)SSC-Enthusiastic (142 reputation)

Group: General Forum Members
Points: 142 Visits: 633
Hello there !

Please help me to create a batch file which does/satisfy the below requirement..,

I want to Copy older than 30 Days Files to archive Folder in all Sub folders of Backup Folder
like I have a backup folder name : D:\Main Folder
In D:\Main Folder I have a multiple Sub directories like
D:\Main Folder\a_folder
D:\Main Folder\b_folder
D:\Main Folder\c_folder
D:\Main Folder\d_folder
....
....
....
In each sub folder I have multiple Files like for Example more than 100 Files Excel ...

Daily some FTP Server pushes the Files in to different sub Folders in Main Folder - which I don't have control on that FTP process.

SO what I trying to achieve using batch file is

I want to copy older than 30 days Files in D:\Main Folder\a_folder to same D:\Main Folder\Archive a_folder if Archive a_folder is not exists we need to create the folder and copy the files and do same with D:\Main Folder\b_folder to D:\Main Folder\Archive b_folder & D:\Main Folder\c_folder to D:\Main Folder\Archive C_folder .........,

**Condition - We don't know the Sub Folder names or File Names

Please I was working on this from last week - using some example - but no luck
If you guys have any related Script like not the extract match - please share
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search