Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Нужен скрипт "поиск+переименование+перенос"
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    Total Commander Forum Index -> Автоматизация Total Commander printer-friendly view
View previous topic :: View next topic  
Author Message
Batya



Joined: 15 Dec 2004
Posts: 2224
Location: Москва, Россия

Post (Separately) Posted: Tue Feb 19, 2013 22:19    Post subject: Reply with quote

Petr_Ch wrote:
А надо чтобы в каждом с 0001 начиналась.

Продолжаем преобразования.
Вместо j объявляем другую переменную:
Code:
Dim Path, Name, FullPath, SepPos, SepPosArr, IsFolder, BaseName, NUM
Set NUM = CreateObject("Scripting.Dictionary")

Строку "j = j + 1" убираем.

Вместо
Code:
  NameArr(r) = "out\" & Right(String(4, "0") & j, 4)
пишем
Code:
  If NUM.Exists(LCase(Path)) Then NUM((LCase(Path))) = NUM(LCase(Path)) + 1 Else NUM.Add LCase(Path), 1
  NameArr(r) = "out\" & Right(String(4, "0") & NUM((LCase(Path))), 4)

_________________
Нет, я не сплю. Я просто медленно моргаю.
Back to top
View user's profile Send private message
Petr_Ch



Joined: 02 Feb 2013
Posts: 17

Post (Separately) Posted: Wed Feb 20, 2013 19:42    Post subject: Reply with quote

Ура. Всё работает.

Большое спасибо! Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Автоматизация Total Commander All times are GMT + 4 Hours
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group