Sponsored Content
Operating Systems Linux Create folder by script & move files in it Post 302568657 by paragnehete on Friday 28th of October 2011 12:47:52 AM
Old 10-28-2011
Create folder by script & move files in it

Hi Team,

I have over 1 lakh pdf files.

I want to create folders like Disk-1, Disk-2 ..... & want to move 3000 pdfs per folder. Can i do it by script? Please help me.

Thanks & Regards
Parag Nehete
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script delete log files from folder & subfolders on space usage

Hi, I am trying to write a shell script to delete logs generate by db when space in the folder reaches 70%. i am getting space values from db, find the files at OS and remove them by using a cron job runs every 5minutes. I have to keep the latest 5 files at any time, my problem is that log files... (3 Replies)
Discussion started by: saha
3 Replies

2. UNIX for Dummies Questions & Answers

sample script to archive & move previous day syslog files

hi all. Please help me with archiving previous day syslog files. the files have no extension and have the format YYYY-MM-DD. I want to archive the file then move it to some other machine. thanks. (2 Replies)
Discussion started by: coolatt
2 Replies

3. Shell Programming and Scripting

move files to some folder

Hello folk, I want to move some *.jpg and *.JPG to some folder but i want move from current path not from subdirectories, wants to move 200 days old file. it will go in /dir/aa/target/*.jpg|*.JPG but not go inside /dir/aa/target/other-directories, Plese help (2 Replies)
Discussion started by: learnbash
2 Replies

4. Shell Programming and Scripting

Move files & folder structure

Hey, this might be a really basic question, but I'm new to Unix scripting. I'm trying to find a command to replicate a file structure from one location to another & move the actual files contained in the base directories, i.e. I have this structure - home/temp/test/dir1/ ... (3 Replies)
Discussion started by: SOCLA_CELT
3 Replies

5. Shell Programming and Scripting

Script to move files with similar names to folder

I have in directory /media/AUDIO/WAVE many .mp3 files with names like: my filename_01of02.mp3 my filename_02of02.mp3 Your File_01of06.mp3 Your File_02of06.mp3 etc.... In the same directory, /media/AUDIO/WAVE, I have many folders with names like 9780743579490 9780743579491 etc.. Inside... (7 Replies)
Discussion started by: glev2005
7 Replies

6. Programming

Script for creating a directory & move the .tif files in it.

Hi Team, I have thousands of TIF files which are converted from PDF. Below is a sample of it. LH9406_BLANCARAMOS_2012041812103210320001.tif LH9406_BLANCARAMOS_2012041812103210320002.tif LH9406_BLANCARAMOS_2012041812103210320003.tif LH9411_ANGENIAHUTCHINSON_2012041812102510250001.tif... (9 Replies)
Discussion started by: paragnehete
9 Replies

7. Shell Programming and Scripting

Script to move one folder to multiple folder...

Hi All, I have to requirement to write a shell script to move file from one folder (A) to another five folder (B,C,D,E,F) and destination folder should be blank. In not blank just skip. This script will run as a scheduler every 2 minutes. It will check number of files in folder A and move 1 to... (9 Replies)
Discussion started by: peekuabc
9 Replies

8. Shell Programming and Scripting

Move files from Space Folder to other folder

I want to move a folder with spaces from one folder to another. I have two folders like this, 1).RT_032-222 -4444-01/ 2). RT_032-555 -7777-01/ I want to move files from 2 to 1 through shell script.Here I want to assign this like a user defined variable like as Source branch... (2 Replies)
Discussion started by: kannansoft1985
2 Replies

9. Shell Programming and Scripting

Script to move files and Creation of folder structure

We are receiving few zipped files in one location say : apple/oranges/incoming All .zip files are placed here in incoming folder. So few of the files are password encrypted. There are only 10 zipped files, so we are planning to create a script which will pick that zip file from incoming... (1 Reply)
Discussion started by: Sidhant
1 Replies

10. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
refile(1)						      General Commands Manual							 refile(1)

NAME
refile - file message in other folders (only available within the message handling system, mh) SYNOPSIS
refile [msgs] [+folder] [options] OPTIONS
Refiles the draft message, or the current message in your +drafts folder, if you have one set up. You cannot give a msgs argument when you use this option. Moves a file into a folder. This option takes a file from its directory and places it in the named folder, as the next message in the folder. The file must be formatted as a legal mail message. This means that the message must have the minimum header fields separated from the body of the message by a blank line or a line of dashes. Prints a list of the valid options to this command. Keeps a copy of the message in the source folder. Normally, refile removes the messages from the original folder when it refiles them. The -link option keeps a copy in the original folder, as well as filing a copy in the new folder. Preserves the number of a message in the new folder. Normally, when a message is refiled in to another folder, it is set to the next available number in that folder. The -preserve option keeps the number of the message the same in the new folder as it had been in the old. You cannot have two messages with the same number in one folder, so you should use this option with care. Specifies the source folder to take messages from. Normally, messages are refiled from the current folder into another folder. However, you can take mes- sages from a different folder by using the -src +folder option to specify the alternative source folder. DESCRIPTION
Use the refile command to move the specified message from the current folder to another folder. You can refile messages in more than one folder by giving multiple folder names as arguments. If you do not specify a message, the current message is refiled. You can refile a message other than the current message by giving its num- ber as a msgs argument. You can also refile more than one message at a time by specifying more than one message number, or a range of mes- sage numbers, or a message sequence. See mark(1) for more information on sequences. The current folder remains the same unless the -src option is specified; in that case, the source folder becomes current. Normally, the last message specified becomes the current message. However, if the -link option is used, the current message is not changed. If the Previous-Sequence: entry is set in the file, in addition to defining the named sequences from the source folder, refile will also define those sequences for the destination folders. See mh_profile(4) for information concerning the previous sequence. PROFILE COMPONENTS
Path: To determine your Mail directory Folder-Protect: To set protections when creating a new folder rmmproc: Program to delete the message EXAMPLES
The following example refiles messages 3 and 5 in the folder +records: % refile 3 5 +records The next example files the current message into two folders: % refile +jones +map The next example takes message 13 in the current folder and refiles it in the +test folder. The mes- sage remains in the current folder as well as appearing in the +test folder. % refile -link 13 +test The next example takes a message from the folder +test when it is not the current folder, and places it in the folder +outbox: % refile 3 -src +test +outbox FILES
The user profile. SEE ALSO
folder(1), mark(1), mh_profile(4) refile(1)
All times are GMT -4. The time now is 11:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy