Computer Hope

Microsoft => Microsoft DOS => Topic started by: TosunPASA on March 27, 2016, 06:05:15 AM

Title: Change all filesname with log
Post by: TosunPASA on March 27, 2016, 06:05:15 AM
Hello
i have hundreds file in directory. i will include filetype to batch code (txt, pdf, xls, ...etc)
but, i wanna use different rename formats.

a) i wanna change file names with time&date format with number (%time%date###) (# mean numerical count, can use ## or ##### types)
example :
my file name  : 
text1.txt   ===>   270320161428001.txt   (27 day, 03 month, 2016 year, 14 hour, 28 min, 001 is first number)
helga.xls   ===>   270320161428002.xls   (27 day, 03 month, 2016 year, 14 hour, 28 min, 002 is number)
named_files.pdf   ===>   270320161428003.pdf   (27 day, 03 month, 2016 year, 14 hour, 28 min, 003 is number)

or format (%time###%date)
text1.txt ===> 27032016001428.txt
helga.xls ===>270320160021428.xls
named_files.pdf ===> 270320160031428.pdf

doesnt matter filetype on rename, can change random filetype on rename

b) i wanna change file names with formatted nums (#####) (mean will use 5 levels on numbers)
example :
text1.txt ===>  00001.txt
helga.xls ===>  00002.xls
named_files.pdf ===>  00003.pdf

doesnt matter filetype on rename, can change random filetype on rename

c) i wanna change file names with random number  (rnd#####) (mean will use 5 level random numbers)
example :
text1.txt ===>  01825.txt
helga.xls ===>  99371.xls
named_files.pdf ===>  60001.pdf

doesnt matter filetype on rename, can use random number in random file types (only important # count)

d) i wanna change file names with word and number (word###, # number level)
example :
text1.txt ===>  word001.txt
helga.xls ===> word002.xls
named_files.pdf ===> word003.pdf

or (word#####)

text1.txt ===>  word00001.txt
helga.xls ===> word00002.xls
named_files.pdf ===> word00003.pdf

doesnt matter filetype on rename, can change random filetype on rename


and final.
i wanna know old name with new name on log file (into text file, can use log file name     RN_Log_file.txt)

batch command must insert to text file old & new name to my log file with this format (after renamed per file)

can be log file format :
"oldname|newname|directory_path"
(text1.txt|word001.txt|c:\dir1)
(helga.xls|word002.xls|c:\dir1)
(named_files.pdf|word003.pdf|c:\dir1)

i am using file archive on right mouse menu, adding to reg file  :)

could you help me for different rename formats ?
Title: Re: Change all filesname with log
Post by: DaveLembke on March 27, 2016, 06:11:44 AM
Better File Rename has features like what you require... but its not free. Not sure if you checked into that.

Found this free alternative, but never used it to know if its a solution or not: http://alternativeto.net/software/bulk-rename-utility/
Title: Re: Change all filesname with log
Post by: TosunPASA on March 27, 2016, 06:16:09 AM
Better File Rename has features like what you require... but its not free. Not sure if you checked into that.

Found this free alternative, but never used it to know if its a solution or not: http://alternativeto.net/software/bulk-rename-utility/

hello Dave
i know execute programs for file rename. but, i dont use it.. because.. i will create batch file for different format renames and will add to mouse right click on register

very easy and can use whenever time click


Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\ReName]
"SubCommands"=""
"MUIVerb"="ReName"
[HKEY_CLASSES_ROOT\Directory\Background\shell\ReName\shell]

[HKEY_CLASSES_ROOT\Directory\Background\shell\ReName\shell\alphanum]
"MUIVerb"="alphanum"
[HKEY_CLASSES_ROOT\Directory\Background\shell\ReName\shell\alphanum\command]
@="\"C:\\____Batch\\ReName\\alphanum.bat\""
Title: Re: Change all filesname with log
Post by: foxidrive on March 27, 2016, 09:40:06 AM
You've shown the same 3 filenames that you want in 6 different formats.

It's unclear what you are actually after.


text1.txt   ===>   270320161428001.txt   (27 day, 03 month, 2016 year, 14 hour, 28 min, 001 is first number)
helga.xls   ===>   270320161428002.xls   (27 day, 03 month, 2016 year, 14 hour, 28 min, 002 is number)
named_files.pdf   ===>   270320161428003.pdf   (27 day, 03 month, 2016 year, 14 hour, 28 min, 003 is number)

text1.txt ===> 27032016001428.txt
helga.xls ===>270320160021428.xls
named_files.pdf ===> 270320160031428.pdf

text1.txt ===>  00001.txt
helga.xls ===>  00002.xls
named_files.pdf ===>  00003.pdf

text1.txt ===>  01825.txt
helga.xls ===>  99371.xls
named_files.pdf ===>  60001.pdf

text1.txt ===>  word001.txt
helga.xls ===> word002.xls
named_files.pdf ===> word003.pdf

text1.txt ===>  word00001.txt
helga.xls ===> word00002.xls
named_files.pdf ===> word00003.pdf
Title: Re: Change all filesname with log
Post by: patio on March 27, 2016, 09:45:43 AM
Is that you Zask ? ?
Title: Re: Change all filesname with log
Post by: TosunPASA on March 27, 2016, 11:14:29 AM
@foxidrive

yes.. i wanna change file names with different 6 format

mean.. if you can help me i will use 6 batch file for renames
Title: Re: Change all filesname with log
Post by: TosunPASA on March 27, 2016, 11:15:58 AM
Is that you Zask ? ?

dont know Zask

i am archiving my files with different renamed to database.. for security. wanna use log file for restore
Title: Re: Change all filesname with log
Post by: foxidrive on March 27, 2016, 03:54:57 PM
I browsed some past posts from you, and in this task you really need to explain clearly what you are planning to do.
Title: Re: Change all filesname with log
Post by: TosunPASA on March 27, 2016, 04:16:33 PM
@foxidrive

i am archiver

user dont use formated file names.. files coming to my disks... and i modify file names...
i am not coder
and.. i wanna create new record types for archive
and need new file name formats

yes.. dont thx much before helps to me. i know.

but i am very simple user
Title: Re: Change all filesname with log
Post by: foxidrive on March 27, 2016, 04:53:41 PM
Explain clearly what you are planning to do.
Title: Re: Change all filesname with log
Post by: TosunPASA on March 28, 2016, 11:38:15 AM
@foxidrive

file original names, very long or very short. users dont use standart file name and dont use alphabetic

soooo... file name problem on archive... we wanna use different format on db
and we will insert original filename with changed name to db
but.. we will archive all files our masked type (format) not original names. else... different alphabet and different file name lenght...

Title: Re: Change all filesname with log
Post by: patio on March 28, 2016, 04:08:06 PM
Clear as Mud...
Title: Re: Change all filesname with log
Post by: foxidrive on March 30, 2016, 04:09:04 AM
There sure is a lot of mud there.

TosunPASA, show us a list something like this and explain the rules you need to follow to rename the files.

Quote
"peter's book.txt"  "New name for peter's book.txt"
"Cooking with Eagles.xls"  "New name for Cooking with Eagles.xls"
"Motorcycle disassembly in 10 minutes.pdf"  "New name for Motorcycle disassembly in 10 minutes.pdf"



Title: Re: Change all filesname with log
Post by: foxidrive on April 01, 2016, 06:53:06 AM
Via PM
Quote from: TosunPASA
hello

did you read my example on topic's begin ?

thx ur help for all time

You didn't say so, but it's looking like you want to rename every file in a folder to destroy the filenames, but keep them in a log file so they can be renamed back to the original names.

How much do you charge for this service?

I get the impression now that it's foreign characters in filenames that is causing the problem.

They cause problems in batch scripts too - and putting the foreign names in a log file is not a reliable way to extract them again as they will be 8-bit characters, or Unicode characters, or the code page will be a factor in restoring them too.


Why don't you archive each file with a sequential number as the archive name?
Title: Re: Change all filesname with log
Post by: TosunPASA on April 01, 2016, 12:24:36 PM
because...
original filenames not standard length and different alphabetic codes

i will insert renamed files to same directory will be standard length, example "char(12)"

or timed number or with uniq name (word)

mean.. i will use different rename format for different times and work
if you will hack my disk, you cant know which file - from where

i will insert log file to different DB on different location.
when i need that original file.. i will merge db records

Title: Re: Change all filesname with log
Post by: patio on April 01, 2016, 04:59:26 PM
Getting way clearer as we go...
Title: Re: Change all filesname with log
Post by: foxidrive on April 01, 2016, 11:37:14 PM
because...
original filenames not standard length and different alphabetic codes

I mentioned that here http://www.computerhope.com/forum/index.php/topic,155458.msg944973.html#msg944973 (http://www.computerhope.com/forum/index.php/topic,155458.msg944973.html#msg944973)
and why it is a problem in batch files.

A good solution can be to put each file in a ZIP archive so the original filesname is preserved inside the archive, and the ZIP file itself can have a short filename.

Try using Google Translate (https://translate.google.com/) with your native language - it is very difficult to follow what you mean when there is not enough information and there is also a language barrier.
Title: Re: Change all filesname with log
Post by: patio on April 02, 2016, 06:40:27 AM
My apologies....i didn't realise it was a language issue.