Welcome Guest.   Make a donation to an author on the site April 18, 2014, 10:04:52 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
  Forum Home Thread Marks Chat! Downloads Search Login Register  
  Show Posts
      View this member's profile 
      donate to someone Donate to this member 
Pages: Prev 1 2 3 4 [5] 6 7 8 9 10 ... 128 Next
101  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 14, 2014, 07:11:20 PM
Spaces ... I hate them.

Updated button.
102  Main Area and Open Discussion / General Software Discussion / Re: Command Line special needs for Batch file - Replace/rename/remove in filenames on: February 14, 2014, 07:00:21 PM
You're not quite there yet with the code tags smiley

You're supposed to put your code between the code and /code - you've put

code
/code
batch file
code
/code


## AT THIS POINT I WOULD LIKE TO ADD 15 SPACES BEFORE CONTENTS OF THE LINE. 
LINES WITHOUT A "\" AT THIS POINT ARE THE NAME OF THE OWNER OF THE FOLLOWING LINES )

Do you want something like this:

Formatted for Text with the GeSHI Syntax Highlighter [copy or print]
  1.               John
  2. http://www.john.com/.....
  3. http://www.john2.com/.....
  4.               Fred
  5. http://www.fred.org/....
  6.               Julie
  7. http://www.julie.me/

If so I would think that the same method as in my post above could be used:

Formatted for Generic Code with the GeSHI Syntax Highlighter [copy or print]
  1. @echo off
  2. rem URL with less than 5 forward slashes
  3. set URL=http://not/longenuff/test.txt
  4. call :TestLen %URL%
  5.  
  6. rem URL with more than 5 forward slashes
  7. set URL=http://www/need/to/make/it/longer/test.txt
  8. call :TestLen %URL%
  9. goto :End
  10.  
  11. :TestLen
  12. for /f "usebackq delims=/ tokens=5" %%a in (`echo.%1`) do (call :LongEnuff %%a %1)
  13. goto :EOF
  14.  
  15. :LongEnuff
  16. if /i not %1 == "" echo.%2
  17. goto :EOF
  18.  
  19. pause

ie. Use / as a delimiter and test to see whether the fifth argument is empty or not.  Seems to work.

Except this time your delimiter is \ and you only want to test the second argument, if it's empty then there was no \.

So the changed bits:

Formatted for Generic Code with the GeSHI Syntax Highlighter [copy or print]
  1. for /f "usebackq delims=\ tokens=2" %%a in (`echo.%1`) do (call :NoSlash %%a %1)
  2.  
  3. ...
  4.  
  5. :NoSlash
  6. if /i %1 == "" echo.               %2
  7. goto :EOF

Adjust rest as needed.
103  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 14, 2014, 06:00:49 AM
Not being unusually thick on my part but ... why did the interface for SetFolDateFM show up?

It's called from within the script, (as long as you set the path correctly).

Or do you swap ini files around depending on what date, (oldest/newest/etc), you want to set?
104  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 14, 2014, 05:24:50 AM
Continuing on with the SetFolDateFM script which carries on from the previous post, (as in "So if you put that RegEx into the script back here, you could select every file and hit the button.").

  • Download the attached button for DOpus, (BTW, at this point I'm only going to deal with DOpus 11).
  • Extract and open the XML file in notepad, Select All, then Copy.

[attachthumb=1]

  • Open the Customise dialog in a DOpus lister.

[attachthumb=2]

  • Right-click on a toolbar and select Paste.

[attachthumb=3]

  • Bingo!  A new button.

[attachthumb=4]

  • Double-click on the button and then edit the script so that it has the correct path to SetFolDateFM.exe

[attachthumb=5]

  • OK out of the Button Editor and the Customise dialog.
  • Select some files, the script is using the RegEx from my previous post (.*?)(?:([-\s]\d{2}).*|\.\w+)$ - so you can select all your files.  It doesn't matter if some have date+time, seq+date+time, date, seq+date, or no date+time.
  • Press the button.

[attachthumb=6]

  • The result, (it's copying the files' MODIFIED date/time to the newly created folders CREATED and MODIFIED date/time - because that's what SetFolDateFM.ini is set for).

[attachthumb=7]

Try it on some test files first.  In theory, one button just replaced your four Drag'n'Drop menu items.

Part 2 later.
105  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 14, 2014, 04:08:42 AM
There were three parts to my previous post, I'll start from the last.

First things first - refer to this post by you.

... but find-replace are limited to filenames only.

I never said it wasn't.

Quote
I have not found any tools that can modify folderdates based on dates in the foldernames.

I never said that's what it did or that there was.

What I did say was you could replace the four RegEx commands you use now with just one - or in pictures:

Current:
[attachthumb=1]

Replacement:
[attachthumb=2]

Thus the four RegEx commands you use now could be replaced by just one, ie. from this:

Quote
1st regex: Create Filenamed Folder to MOVE to... (Date+Time)
Rename REGEXP PATTERN "(.+)(-|\s)(\d{6}|\d{8}|\d{2}-\d{2}-\d{4})(-|\s)(\d{6})\.(.+)" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}

2nd regex: Create Filenamed Folder to MOVE to... (##-Date+Time)
Rename REGEXP PATTERN "(.+)(-|\s)(\d{2}|\d{3})(-|\s)(\d{6}|\d{8}|\d{2}-\d{2}-\d{4})(-|\s)(\d{6})\.(.+)" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}

3rd regex: Create Filenamed Folder to MOVE to... (Date Only)
Rename REGEXP PATTERN "(.+)(-|\s)(\d{6}|\d{8}|\d{2}-\d{2}-\d{4})\.(.+)" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}

4th regex: Create Filenamed Folder to MOVE to... (##-Date Only)
Rename REGEXP PATTERN "(.+)(-|\s)(\d{2}|\d{3})(-|\s)(\d{6}|\d{8}|\d{2}-\d{2}-\d{4})\.(.+)" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}

To this:

Create Filenamed Folder to MOVE to...
Rename REGEXP PATTERN "(.*?)(?:([-\s]\d{2}).*|\.\w+)$" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}

It covers the formats you stated:

Files with:
date-time
seq.nbr-date-time
date  only
seq.nbr-date

Plus files without the above, ie. files with just an extension.

I'll go away and do some pictures for the next item on the agenda :)
106  Main Area and Open Discussion / General Software Discussion / Re: Waterfox has now been accepted as a Mozilla project on: February 13, 2014, 10:18:14 PM
And for those with netbooks that have Atom processors: Pale Moon Intel Atom builds

Quote
Pale Moon - Intel Atom™ builds
This version of Pale Moon is optimized specifically for use on Intel Atom™ processors.
Many low-powered netbooks and laptops are equipped with this processor, and using a build of Pale Moon specifically optimized for this processor will reduce power consumption and increase speed of the browser for these systems.

Please note the following:

  • These builds are specifically optimized for Intel Atom™ processors, and are not recommended for regular Intel or AMD processors. The extra optimizations only work on Atom processors and will execute significantly slower than the normal version of Pale Moon on a non-Atom processor.
  • These builds are otherwise exactly the same as the normal desktop version of Pale Moon, built from the same source code. No other changes are made to the browser.

Also, with the latest update of Tab Mix Plus (0.4.1.3), my F3 key has stopped being eaten during searches - it works normally again.
107  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 13, 2014, 07:29:52 PM
pasted your v11 code in it.

First off, the V11 version as I posted it, does not contain the line: Rename "*" TO "*"
Your attached version does.

Secondly, are you setting the new button to Script Function as shown here for the SetFolDateFM script I posted.

The script has been tested in DOpus x64 v11b6 and b7, on Win8.1 x64 and XP x86.

Button code is attached - open it in a text editor, copy the text, then paste it into a toolbar while the Customise dialog is open, (right-click on a toolbar, paste).

I'll have a look at the DO10 version later but it worked OK in a VM running XP x86 and DOpus 10.5.4.0

EDIT: The DO10 version works fine on XP Pro SP3 x86 (both VM and real) and WHS2011 x64 using DOpus 10.5.4.0


With the RegEx rename commands you're using, you could replace all four with:

Create Filenamed Folder to MOVE to...
Rename REGEXP PATTERN "(.*?)(?:([-\s]\d{2}).*|\.\w+)$" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}

(.*?)(?:([-\s]\d{2}).*|\.\w+)$   Match everything up until the first occurrence of two digits or the extension, whichever comes first, but don't capture what follows.

An example:

[attach=3]

So if you put that RegEx into the script back here, you could select every file and hit the button.

BTW, here's an online RegEx tester that's compatible with DOpus' version, (TR1 ECMAScript): RegExr
Here's the above expression sans leading capture group.
108  Main Area and Open Discussion / Living Room / Re: silly humor - post 'em here! [warning some NSFW and adult content] on: February 13, 2014, 05:29:27 AM
A man and his wife went on vacation to Jerusalem.  While they were there, the wife passed away.

The undertaker told the husband, "You can have her shipped home for $5000, or you can bury her here, in the Holy Land, for $150."

The man thought about it and told him he would just have her shipped home.

The undertaker asked, "Why would you spend $5000 to ship your wife home, when it would be wonderful to be buried here and you would spend only $150?"

The man replied, "Long ago a man died here, was buried here, and three days later he rose from the dead.  I can't take that risk."
109  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 12, 2014, 08:19:50 PM
Sorry - I can't get it working.
Feel sad to say that....  Sad

Believe or not, there is a reason I wrote For DOPUS 11  Wink
The methods and properties used in the script don't exist in DOpus 10.

Quote
If the script is for a button, in Opus v10.x I need to add:

It won't work in anything lower than DOpus 11 - I don't have DOpus 10 installed and like Innuendo, come the day DOpus 11 is up for sale some of my cash will be going their way.  Writing scripts is so much easier in DOpus 11 because a lot more information is easier to get at and use now.

For DOpus 10:

Formatted for Generic Code with the GeSHI Syntax Highlighter [copy or print]
  1. Rename PATTERN="*" TO="*"
  2. @script vbscript
  3. Option Explicit
  4. ' Original script by MrC
  5. ' http://resource.dopus.com/viewtopic.php?f=3&t=19704&hilit=setattr+modify&start=20#p106752
  6. '
  7. ' Modified to work (extraneous \ added to file paths).
  8. ' Added folder date change.
  9.  
  10. ' For information on the technique used in this button see:
  11. ' "Abusing" Rename Scripts to do other things with file info
  12. ' http://resource.dopus.com/viewtopic.php?t=8034
  13.  
  14. ' Change the path below if you haven't installed Opus to the default location:
  15. dim DOpusRTPath
  16. DOpusRTPath = "%ProgramFiles%\GPSoftware\Directory Opus\dopusrt.exe"
  17.  
  18. Dim Shell
  19. Set Shell = CreateObject("WScript.Shell")
  20.  
  21. Function Rename_GetNewName(strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName)
  22.  Dim strDateTime
  23.  Dim strCommand
  24.  ' Set strNewName to an empty string so that Opus does not rename the file.
  25.  strNewName = ""
  26.  
  27.  ' 10 digits, dash, 4 digits space dd-mm-yyyy.pdf
  28.  Dim reA
  29.  Set reA = new RegExp
  30.  reA.Pattern = "^\d{10}-\d{4} (\d{2})-(\d{2})-(\d{4})(?:.*?)$"
  31.  
  32.  ' Date / Scan Date pattern: dd mm yyyy ddmmyyyy, with possible space or dash separators in Date
  33.  Dim re0
  34.  Set re0 = new RegExp
  35.  re0.Pattern = "^(?:.*?)[-\s]*(\d{2})([-\s]*)(\d{2})\2(\d{4})[-\s]+(\d{8})(?:.*?)$"
  36.  
  37.  ' Date / Time pattern: dd mm yyyy hh mm ss, with possible space or dash separators
  38.  Dim re1
  39.  Set re1 = new RegExp
  40.  re1.Pattern = "^(?:.*?)[-\s]*(\d{2})([-\s]*)(\d{2})\2(\d{4})[-\s]+(\d{2})([-\s]?)(\d{2})\6(\d{2})(?:.*?)$"
  41.  
  42.  ' Date pattern: dd mm yyyy, with possible space or dash separators
  43.  Dim re2
  44.  Set re2 = new RegExp
  45.  re2.Pattern = "^(?:.*?)[-\s]*(\d{2})([-\s]*)(\d{2})\2(\d{4})(?:.*)$"
  46.  
  47.  ' Date / Time pattern: yyyy-mm-dd hh mm ss
  48.  Dim re3
  49.  Set re3 = new RegExp
  50.  re3.Pattern = "^(?:.*?)[-\s]*(\d{4}([-\s]*)\d{2}\2\d{2})[-\s]+(\d{2})([-\s]?)(\d{2})\4(\d{2})(?:.*?)$"
  51.  
  52.  ' Date pattern: yyyy-mm-dd
  53.  Dim re4
  54.  Set re4 = new RegExp
  55.  re4.Pattern = "^(?:.*?)[-\s]*(\d{4}([-\s]*)\d{2}\2\d{2})(?:.*)$"
  56.  
  57.  If (reA.Test(strFileName)) Then
  58.    strDateTime = reA.Replace(strFileName, "$3$2$1")  
  59.    strDateTime = strDateTime & " " & GetFileModTime(strFilePath & strFileName, fIsFolder)
  60.    'DOpus.OutputString "Date A  = " & strDateTime
  61.  ElseIf (re0.Test(strFileName)) Then
  62.    strDateTime = re0.Replace(strFileName, "$4$3$1")  
  63.    strDateTime = strDateTime & " " & GetFileModTime(strFilePath & strFileName, fIsFolder)
  64.    'DOpus.OutputString "Date 0  = " & strDateTime
  65.  ElseIf (re1.Test(strFileName)) Then
  66.    strDateTime = re1.Replace(strFileName, "$4$3$1 $5:$7:$8")
  67.    'DOpus.OutputString "Date 1  = " & strDateTime
  68.  ElseIf (re2.Test(strFileName)) Then
  69.    strDateTime = re2.Replace(strFileName, "$4$3$1")
  70.    strDateTime = strDateTime & " " & GetFileModTime(strFilePath & strFileName, fIsFolder)
  71.    'DOpus.OutputString "Date 2  = " & strDateTime
  72.  ElseIf (re3.Test(strFileName)) Then
  73.    strDateTime = re3.Replace(strFileName, "$1 $3:$5:$6")
  74.    'DOpus.OutputString "Date 3  = " & strDateTime
  75.  ElseIf (re4.Test(strFileName)) Then
  76.    strDateTime = re4.Replace(strFileName, "$1")
  77.    strDateTime = strDateTime & " " & GetFileModTime(strFilePath & strFileName, fIsFolder)
  78.    'DOpus.OutputString "Date 4  = " & strDateTime
  79.  End If
  80.  
  81.  If (Not IsEmpty(strDateTime)) Then
  82.    'DOpus.OutputString "Set Date & Time  = " & strDateTime
  83.    strCommand = Q(DOpusRTPath) & " /cmd SetAttr FILE=" & Q(strFilePath & strFileName) & " MODIFIED=" & Q(strDateTime)
  84.    'DOpus.OutputString "CMD = " & strCommand
  85.    Shell.Run strCommand,0,true
  86.  End If
  87. End Function
  88.  
  89. Function GetFileModTime(filespec, isdir)
  90.  Dim fso, f, s
  91.  Set fso = CreateObject("Scripting.FileSystemObject")
  92.  If isdir Then
  93.    Set f= fso.GetFolder(filespec)
  94.  Else
  95.    Set f = fso.GetFile(filespec)
  96.  End If
  97.  s = split(f.DateLastModified, " ", -1, 1)
  98.  GetFileModTime = s(1)
  99. End Function
  100.  
  101. Function Q(s)
  102.  Q = """" & s & """"
  103. End Function

And it is not a Rename preset - see here.
110  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 12, 2014, 06:48:38 AM
You need to learn a little VBScript smiley

[attachthumb=1]

For DOpus 11:

Formatted for Generic Code with the GeSHI Syntax Highlighter [copy or print]
  1. @script vbscript
  2. Option Explicit
  3.  
  4. ' Original script by MrC
  5. ' http://resource.dopus.com/viewtopic.php?f=3&t=19704&start=20#p106752
  6. '
  7. ' Modified for DOpus 11
  8.  
  9. Dim file, strDateTime, attrcmd
  10.  
  11. ' 10 digits, dash, 4 digits space dd-mm-yyyy.pdf
  12. Dim reA
  13. Set reA = new RegExp
  14. reA.Pattern = "^\d{10}-\d{4} (\d{2})-(\d{2})-(\d{4})(?:.*?)$"
  15.  
  16. ' Date / Scan Date pattern: dd mm yyyy ddmmyyyy, with possible space or dash separators in Date
  17. Dim re0
  18. Set re0 = new RegExp
  19. re0.Pattern = "^(?:.*?)[-\s]*(\d{2})([-\s]*)(\d{2})\2(\d{4})[-\s]+(\d{8})(?:.*?)$"
  20.  
  21. ' Date / Time pattern: dd mm yyyy hh mm ss, with possible space or dash separators
  22. Dim re1
  23. Set re1 = new RegExp
  24. re1.Pattern = "^(?:.*?)[-\s]*(\d{2})([-\s]*)(\d{2})\2(\d{4})[-\s]+(\d{2})([-\s]?)(\d{2})\6(\d{2})(?:.*?)$"
  25.  
  26. ' Date pattern: dd mm yyyy, with possible space or dash separators
  27. Dim re2
  28. Set re2 = new RegExp
  29. re2.Pattern = "^(?:.*?)[-\s]*(\d{2})([-\s]*)(\d{2})\2(\d{4})(?:.*)$"
  30.  
  31. ' Date / Time pattern: yyyy-mm-dd hh mm ss
  32. Dim re3
  33. Set re3 = new RegExp
  34. re3.Pattern = "^(?:.*?)[-\s]*(\d{4}([-\s]*)\d{2}\2\d{2})[-\s]+(\d{2})([-\s]?)(\d{2})\4(\d{2})(?:.*?)$"
  35.  
  36. ' Date pattern: yyyy-mm-dd
  37. Dim re4
  38. Set re4 = new RegExp
  39. re4.Pattern = "^(?:.*?)[-\s]*(\d{4}([-\s]*)\d{2}\2\d{2})(?:.*)$"
  40.  
  41. Dim reTime
  42. Set reTime = new RegExp
  43. reTime.Pattern = "^(?:.*?)\s(\d{2}):(\d{2}):(\d{2})(?:.*)$"
  44.  
  45. DOpus.OutputString "---- DateFromName ----"
  46. Function OnClick(ByRef ClickData)
  47.  For Each file In ClickData.func.sourcetab.selected
  48. '    If file.is_dir Then             ' --- Uncomment this and "End If" below if you only want it to act on folders
  49.      DOpus.OutputString Q(file.path & file.name) & "|" & file.modify_utc & "|" & file.modify
  50.      If (reA.Test(file.name)) Then
  51.        strDateTime = reA.Replace(file.name, "$3$2$1")  
  52.        strDateTime = strDateTime & " " & reTime.Replace(file.modify, "$1:$2:$3")
  53.        DOpus.OutputString "Date A  = " & strDateTime
  54.      ElseIf (re0.Test(file.name)) Then
  55.        strDateTime = re0.Replace(file.name, "$4$3$1")  
  56.        strDateTime = strDateTime & " " & reTime.Replace(file.modify, "$1:$2:$3")
  57.        DOpus.OutputString "Date 0  = " & strDateTime
  58.      ElseIf (re1.Test(file.name)) Then
  59.        strDateTime = re1.Replace(strFileName, "$4$3$1 $5:$7:$8")
  60.        DOpus.OutputString "Date 1  = " & strDateTime
  61.      ElseIf (re2.Test(file.name)) Then
  62.        strDateTime = re2.Replace(file.name, "$4$3$1")
  63.        strDateTime = strDateTime & " " & reTime.Replace(file.modify, "$1:$2:$3")
  64.        DOpus.OutputString "Date 2  = " & strDateTime
  65.      ElseIf (re3.Test(file.name)) Then
  66.        strDateTime = re3.Replace(file.name, "$1 $3:$5:$6")
  67.        DOpus.OutputString "Date 3  = " & strDateTime
  68.      ElseIf (re4.Test(file.name)) Then
  69.        strDateTime = re4.Replace(file.name, "$1")
  70.        strDateTime = strDateTime & " " & reTime.Replace(file.modify, "$1:$2:$3")
  71.        DOpus.OutputString "Date 4  = " & strDateTime
  72.      End If
  73.  
  74.      If (Not IsEmpty(strDateTime)) Then
  75.        DOpus.OutputString "New Date & Time: " & strDateTime
  76. attrcmd = "SetAttr FILE=" & Q(file.path & file.name) & " MODIFIED=" & Q(strDateTime)
  77. DOpus.OutputString attrcmd
  78. ClickData.func.command.RunCommand attrcmd
  79.      End If
  80. '    End If      ' --- Uncomment to match "If file.is_dir Then" statement above
  81.  Next
  82. End Function
  83.  
  84. Function Q(s)
  85.  Q = """" & s & """"
  86. End Function


And the previous VBScript runs SetFolDateFM only on the newly created folders, not all of them.
111  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 11, 2014, 10:59:47 PM
FolderNameXYZ 10-02-2014         with folder modified date 01-12-2013

then folder modified date to be updated to 10-02-2014

You could do it in DOpus using a Rename script but naturally you need to specify RegEx to get the info you want from the name ... also naturally, if the date format changes, you have to change the RegEx.


Luckily, someone has done it: Change modified date after filename
112  Main Area and Open Discussion / Living Room / Re: Project Christine - Modular PC from Razer on: February 10, 2014, 11:21:48 PM
I'm wondering whether the price will be within the realms of many small countries GDP.
113  Main Area and Open Discussion / General Software Discussion / Re: hubiC, DropBox like service with interesting pricing on: February 10, 2014, 06:48:22 PM
I'm confuzzled:

You actually fill in real names and email?

 ohmy
114  Main Area and Open Discussion / Living Room / Re: A Point About Grammar on: February 10, 2014, 06:44:08 PM
On SBS World News here, we sometimes get stories with subtitles for interviews with people in Africa - who are speaking understandable English.  They might then have a news story from somewhere in the UK where, because it's Scotland, Yorkshire, etc, you have to wonder wtf they saying even though it's meant to be English Grin
115  Main Area and Open Discussion / Living Room / Re: Has anyone here used Novicorp WinToFlash? on: February 10, 2014, 06:37:02 PM
There's also SARDU.
116  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 09, 2014, 06:45:45 AM
See later post.

Here's an exercise in DOpus scripting, (only tested on DOpus 11 - actually it only works on DOpus 11):

Formatted for Generic Code with the GeSHI Syntax Highlighter [copy or print]
  1. @script vbscript
  2. Option Explicit
  3.  
  4. Dim regex, file, folder, rencmd, sfdcmd, WshShell
  5.  
  6. Function OnClick(ByRef ClickData)
  7.  sfdcmd = "%programfiles%\GPSoftware\Directory Opus\SetFolDateFM.exe" ' Full path to SetFolDateFM.exe command
  8.  
  9.  Set WshShell = CreateObject("WScript.Shell")
  10.  
  11.  DOpus.OutputString "--- SetFolDate ---"
  12.  Set regex = New RegExp
  13.  With regex
  14.    .Pattern    = "^([^\.-]+).*" ' Change the RegExp to what you want
  15.    .IgnoreCase = true
  16.    .Global     = false
  17.  End With
  18.  
  19.  sfdcmd = Q(sfdcmd) & " /r " & Q(ClickData.func.sourcetab.path)
  20.  For Each file In ClickData.func.sourcetab.selected_files
  21.    If Not file.is_dir Then
  22.      Set folder = regex.Execute(file.name)
  23.      If folder.Count = 1 Then
  24.        rencmd = "Rename " & Q(file.name) & " TO " & Q(folder.Item(0).Submatches(0) + "\" + file.name)
  25.        DOpus.OutputString file.name + "|" + folder.Item(0).Submatches(0)
  26.        DOpus.OutputString rencmd
  27.        DOpus.OutputString "--------"
  28.        ClickData.func.command.RunCommand rencmd
  29.        sfdcmd = sfdcmd & " " & Q(folder.Item(0).Submatches(0))
  30.      End If
  31.    End If
  32.  Next
  33.  DOpus.OutputString sfdcmd
  34.  WshShell.Run(sfdcmd)
  35. End Function
  36.  
  37. Function Q(s)
  38.  Q = """" & s & """"
  39. End Function

[attachthumb=1]

Get your RegExp correct and you can select every file and just hit the button.

BTW, you want to post your RegExp you're using on those commands?

Because I'm quite sure you could reduce the number commands you'd require.

eg. From this image here, you seem to be using 3 different commands presumably with RegExp Rename commands along these lines:

Rename REGEXP PATTERN "(.+)(-|\s)(\d{6}|\d{8}|\d{2}-\d{2}-\d{4})(-|\s)(\d{6})\.(.+)" TO \1\\\0

Whereas, a single command with the following RegEx should cover all 3 types of filenames:

Rename REGEXP PATTERN "^([^\.-]+).*" TO \1\\\0

[attachthumb=2]
117  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 08, 2014, 08:33:07 PM
I can probably tweak it to automatically do Exec All rather than Exec which will take care of it.

It'd still be better to use a variable derived from the filename in the Rename/SetFolDate commands - something that's likely to be rather easy under DOpus 11.

Otherwise a VBScript, (@script vbscript), would be possible - I might look at that.

EDIT: Tweaked, try 0.3.1.4
118  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 08, 2014, 04:41:07 AM
One way or the other it has some effect ...  smiley

Yes, but it's not going to do anything because this is what you're sending:

SetFolDateFM.exe /r sourcepath /p sourcepath

/r will be removed if it's there, therefore your final command line will be:

SetFolDateFM.exe sourcepath /p sourcepath

This is going to result in nothing happening since the folder /p doesn't exist, and sourcepath doesn't exist as a sub-directory of itself.

The reason the GUI appears is simple: there's at least 2 arguments in the command line (it doesn't matter what they are)

Also, my bad, the DOpus command is actually Select ALLDIRS but it still won't work because DOpus is executing the following line before the Select one can complete.
119  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 08, 2014, 02:47:42 AM
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile} /p {sourcepath}

Not going to work, the arguments /p {sourcepath} are what are passed to the locate32 program in the thread you mention.

SetFolDateFM.exe only has one option: /r

Try what I said, put Select ALLDIRS between Rename and SetFolDateFM:

Rename REGEXP PATTERN "(.+)(-|\s)(\d{6}|\d{8}|\d{2}-\d{2}-\d{4})(-|\s)(\d{6})\.(.+)" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}
120  Main Area and Open Discussion / General Software Discussion / Re: hubiC, DropBox like service with interesting pricing on: February 07, 2014, 10:21:16 PM
Main page, down the bottom:

[attach=1]
121  Main Area and Open Discussion / General Software Discussion / Re: Configuring Directory Opus for Fun and Profit on: February 07, 2014, 08:12:24 PM
Just in case no one's noticed, DOpus 11 is available as a public beta, (and has been for a month or more).

Quite stable, haven't had it crash or cause any damage yet, (been using it since beta 3, I think).
122  Main Area and Open Discussion / General Software Discussion / Re: hubiC, DropBox like service with interesting pricing on: February 07, 2014, 06:53:45 PM
Is there a translated version of their policies?

https://hubic.com/en/cont...ts/Contrat_hubiC_2013.pdf

2014 version - PDF, still in French.


Quote
Confidentiality

Every document deposited on hubiC is replicated in 3 different OVH datacentres in France. Only you* will have access to your data, using your login and password.


* We neither confirm nor deny that the DGSE also has access to your data.

 smiley

Honestly, how is replicated data ensuring confidentiality?
123  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 07, 2014, 06:30:25 PM
If, as shown in your image, you only have the one folder left after the rename then you could try adding:

Select ALLDIRS

before the SetFolDate command to select the folder, (well, all folders really).

Ideally, you'd set a variable to the folder you want to create and then use it as an argument to both the Rename and SetFolDate commands.
124  DonationCoder.com Software / Finished Programs / Re: DONE: Change (sub) folder(s) date based on newest/oldest file in the folder on: February 07, 2014, 03:55:58 AM
v0.3.1.3 - Added: Can run in no GUI mode using last saved options.

Here's an example UserCommand for DOpus:

Formatted for XML with the GeSHI Syntax Highlighter [copy or print]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <usercommand backcol="none" hide_from_menu="no" textcol="none">
  3. <label>Adjust_Timestamp_NG</label>
  4. <user_label>Adjust_Timestamp_NG</user_label>
  5. <icon1>#usercommand</icon1>
  6. <function type="normal">
  7. <instruction>@dirsonly</instruction>
  8. <instruction>Go {ss}</instruction>
  9. <instruction>&quot;C:\SetFolDate2\SetFolDateFM.exe&quot; /r {ss} {allfile}</instruction>
  10. </function>
  11. </usercommand>

@dcwul62 - in case it wasn't obvious, my remark about the GUI was the usual dry Aussie humour coming out  Wink

Albeit with a rather obvious grammatical screw-up  undecided
125  DonationCoder.com Software / Post New Requests Here / Re: coded needed launch url's on: February 06, 2014, 09:10:53 PM
I honestly despair at moments like this.

1) Read a URL from the text file
2) Execute Firefox, (or Chrome), with it as an argument.
3) Go to step 1

Exactly how is this any different from what you are doing for IE?

ie. Replace this:

Formatted for Autohotkey with the GeSHI Syntax Highlighter [copy or print]
  1. if (A_index = 1)
  2.  wb.Navigate2(URL . A_LoopReadLine, navOpenNewForegroundTab) ; Navigate
  3.  wb.Navigate2(URL . A_LoopReadLine, navOpenInBackgroundTab) ; Navigate

with this:

Formatted for Autohotkey with the GeSHI Syntax Highlighter [copy or print]
  1. Run, Firefox.exe -new-tab A_LoopReadLine, C:\Program Files\Mozilla\Firefox

NOTE: Because I don't use AHK, YOU may have to tweak that line.

Pages: Prev 1 2 3 4 [5] 6 7 8 9 10 ... 128 Next
DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.219s | Server load: 0 ]