• Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    pacl900b-190606.exe (PACL 9.0 Beta 5) pacomp -r not working.
    Brian GregoryB
    I’m trying to backup the complete contents of a directory using: pacomp64 -parcz T:\BACKUP.PA C:\STUFF The contents of subdirectories of C:\STUFF isn’t getting backed up! The sub directories are just stored as empty directories!
    Tech Support
    When extracting 7z files extract only newer files
    B
    How do I achieve this ; show me a command line example !
    Tech Support
    Question Regarding License
    S
    Hello @Mili, thanks for your help in getting my PowerArchiver CommandLine license (Re: License Code Not Working / Missing) and sorry for my late reply. I do check my spam folder regularly and couldn’t find a mail from support. Also, there was no mail in my backups or any mention of it in my email logs. I have a question regarding my licenses in the hope you are able to help me: While my account lists “PowerArchiver Select - lifetime free upgrades and support for PowerArchiver Toolbox English - Count 2”, this does not apply for PACL, which was included with my purchase. My account shows only PowerArchiver Select - 12 months of upgrades and support for PowerArchiver Command Line - Single User License. Since PACL was included with PowerArchiver Toolbox, shouldn’t PACL also come with a lifetime license for 2 PCs? Thanks for your help in advance.
    Tech Support
    PACL 9.0 Beta 2
    spwolfS
    Version: PACL 9.00 Beta 2 What’s New since version PACL 7: Updated to PowerArchiver 2017 engine Fully unicode interface RAR v5 (v4) support PAE2 support Latest format support and all the various engine updates done in PA 2017. Full support for .PA format with many different options and switches. Download: http://dl.powerarchiver.com/2017/PACL900-170429.EXE Due to the support of new PA format and all the changes needed for that support, we decided to move up version number to PACL 9. This is purely cosmetical - companies who purchased PACL8, have PACL9 now added to their orders. Users who have free upgrades for PACL8, now have PACL9 added as free upgrade (Business users with active select (pro/tbx), all personal users (pro/tbx). Since we are finalizing PA 2017, we can also now spend a lot more time on PACL9. Please check your bugs, and check .PA support as well. Thank you! @Alpha-Testers PA Team ConeXware, Inc.
    Tech Support
    The PACL does not extract files from the self-extracting archive
    Michael72M
    My OS: Windows XP Home Edition, SP3 The version number and date of the program: PowerArchiver Command Line v9.00b [Feb 23 2019] The program not extracts one self-extracting file. How to reproduce the problem Download the SFX file by link: install.exe Copy the “install.exe” file into the same location as the program is located. Go to the DOS prompt. Make your PACL location the default drive. If it is on the E drive enter the command E: and press enter. Replace “E:” with the appropriate drive letter. Enter command cd e:<path name> to go to the location where the program resides. Enter command: paext32 -o+ -p"install" "install.exe" As a result, the “install” directory will not be created and no files will be extracted. The “install.exe” file may be damaged but if you use a program such as 7-Zip or PeaZip to extract the files, the extraction process is successful. I want the PACL to also unpack such a file. This problem is very critical for me. I often come across this. I do not want to resort to using other compression program. … Michael
    Tech Support
    PACompXX problem with file name syntax
    BigMikeB
    Topic thumbnail image
    Tech Support
    czip support
    D
    would be nice to have czip support
    Tech Support
    PACL 8.0 Beta 1
    spwolfS
    Version: PACL 8.00 Beta 1 Whats New: Updated to PowerArchiver 2016 engine Fully unicode interface RAR v5 (v4) support PAE2 support Latest format support such as improved ZIPX, ISO, etc, etc, etc. Download: http://dl.powerarchiver.com/2016/pacl800b1.exe Please test it against your existing scripts and let us know. There will be some features added in future release as well as more testing. This is first release, please test. Thank you!
    Tech Support
    pacomp-exe-has-stopped-working)
    P
    I am Having Appcrash mid problem in my Pc.
    Tech Support
    PAConv.bat
    BigMikeB
    Hi, I’ve made changes to fix some problems with PAConv.bat: 1. Replaced the “” by () in the first two lines, so that it’ll work with command line arguments in quotation marks 2. Replaced deltree with rmdir, since deltree is unknown at least in Windows XP and later 3. Also replaced the del command, which left an empty $PATEMP$ directory with rmdir 4. Changed $PATEMP$ to “%TEMP%$PATEMP$.%time::=%”, so that no write privileges are needed in the current directory as the users Temp directory is used and that more operations will work simultaneous, as long as they are not started at the very same time. 5. Changed %n to “%~n” to allow parameters with spaces and quotation marks if (%1)==() goto help if (%2)==() goto help SET PATMPDIR=%TEMP%\$PATEMP$.%time::=% if exist "%PATMPDIR%" rmdir /s /q "%PATMPDIR%" mkdir "%PATMPDIR%" paext -e -d -p"%PATMPDIR%" "%~1" echo. pacomp -a -r -p -w "%~2" "%PATMPDIR%\*.*" echo. rmdir /s /q "%PATMPDIR%" SET PATMPDIR=
    Tech Support
    Profile Details
    B
    Why cant i edit my profile details? in my account
    Tech Support
    Pacl 8.0
    spwolfS
    PACL 8.0. What new features do you guys want from it? Current list for 8.0 RAR 5.x support. Latest ZIP/ZIPX engine with even better performance. Updated rest of engines with latest support for all file formats. Possibly: New PAF format testing. Other things like better logs or what else do we need?
    Tech Support
    How to encrypt file names?
    F
    Is it possible to encrypt file names as well as archive itself using pacl? I know you can do this using Power Archiver but not sure about pacl.
    Tech Support
    Problem with large, spanned, encrypted, 7z archive.
    B
    I spent many hours trying to figure out how to use PACOMP to add about 50 Gb to a spanned 7z archive with AES256 encryption, and have yet to be successful. I’ve tried every combination of switches I can think of, with no success. Can someone offer a combination of switches that is known to work for this kind of task? All I have been able to make is a set of spanned files that PA cannot open.
    Tech Support
    PACOMP -fips and -e2 commands
    F
    Hi I am trying to understand what is default encryption method for PACOMP -fips command? And what is the difference if you specify encryption method using e[0,1,2] command? Using only FIPS: pacomp -a -ssecret -fips -p stuff.bh “c:\my stuff*.*” FIPS combined with e2 pacomp -a -ssecret -fips -e2 -p stuff.bh “c:\my stuff*.*”
    Tech Support
    How to add archive comment using pacomp
    F
    How can I add comment to archive using pacl pacomp?
    Tech Support
    Extracting password protected archive.
    F
    Hi All I have archive that holds password protected, encrypted data which is created using something like this: C:\Temp\ZipTest>pacomp -a -spassword -fips -e2 archive.zip "C:\Temp\ZipTest" -x"C:\Temp\ZipTest\ReadMe.txt" Then I add regular file into that archive which is not encrypted and not password protected. “ReamMe.txt” sort of file. Using command below. C:\Temp\ZipTest>pacomp -a archive.zip "C:\Temp\ZipTest\ReadMe.txt" Now when I extract this archive using: paext -spassword -p"C:\ZipTest\Temp" archive.zip Everything extracts correctly except for ReadMe.txt file. File is present but content is empty. I get following error: extracting: ReadMe.txt --> CRC ERROR! [100%] How can I extract archive without corruption ReadMe.txt file?
    Tech Support
    Archive based on age
    O
    Does PA (preferably the CL version) have the facility to archive files based on an age? (I want to be able to move a quantity of files out of a folder and into an archive if (and only if) they’re over 35 days old. I have an ancient copy of ARJ that can do this (via the -odb switch) but I’d like to use PA, and can’t work out if it’s possible.
    Tech Support
    Pacomp.vbs preserve the folder structure
    G
    Hi in pacomp.vbs by Micke how to preserve the folders structure of the files to compress.:confused: because just compress the files not the folder structure of each file. thanks '******************************************************************* '* PACOMP.vbs '* @author: Micke '* @hist 2010-02-26 CREATED:Script for compress multiple file types '* @hist 2010-03-01 BUGFIX: Space in path or filename resulted in '* no archive was created. '* '* Script for compress multiple file types '* '* Usage: cscript PACOMP.vbs ArchiveName.extension DrivePath '* Example1: cscript PACOMP.vbs C:\Temp\MyArchive.zip D: '* Example2: cscript PACOMP.vbs C:\Temp\MyArchive.zip D:\Temp '* '******************************************************************* Option Explicit 'Variables Dim FSO, objDir, aList, FileExtension, ArchiveName, DrivePath Dim aFile, aItem, strCompressionString, WshShell 'Constants (Change path to your own enviroment) Const PACOMP = "C:\Programs\PACL\PACOMP.exe" 'Check number of arguments If WScript.Arguments.Count <> 2 Then WScript.Echo "Usage: cscript PACOMP.vbs ArchiveName.extension DrivePath" WScript.Echo "Example 1: cscript PACOMP.vbs C:\Temp\MyArchive.zip D:" WScript.Echo "Example 2: cscript PACOMP.vbs C:\Temp\MyArchive.zip D:\Temp" WScript.Quit End If 'Create the FileSystemObject Set FSO = CreateObject("Scripting.FileSystemObject") 'Create the ShellObject Set WshShell = CreateObject("WScript.Shell") 'Get data from the Arguments ArchiveName = WScript.Arguments.Item(0) DrivePath = WScript.Arguments.Item(1) 'Get the Folders for the DrivePath Set objDir = FSO.GetFolder(DrivePath) 'Create a Array with Fileextensions for the archive, change to your enviroment aList = Array("png", "jpg", "avi") 'Search through the folders SearchFolders(objDir) 'Sub for Searching recursive in Folders Sub SearchFolders(pstrCurrentPath) For Each aFile In pstrCurrentPath.Files For Each FileExtension In aList If FileExtension = LCase(Right(CStr(aFile.Name), 3)) Then AddFileToArchive aFile.Path End If Next Next For Each aItem In pstrCurrentPath.SubFolders SearchFolders(aItem) Next End Sub Sub AddFileToArchive(pstrFileName) 'Create the string with parameters for PACOMP strCompressionString = PACOMP & " -a -P " & Chr(34) & ArchiveName & Chr(34) & " " & Chr(34) & pstrFileName & Chr(34) WScript.Echo strCompressionString WshShell.Run strCompressionString, 0, True End Sub
    Tech Support
    My password
    M
    i have make file by powerarchiver 2011 with password put icant unzip it becouse i forget my password pls tell me what ido ineed unzip file
    Tech Support

    Automatic add date and time to Archivename

    Scheduled Pinned Locked Moved Tech Support
    21 Posts 4 Posters 24.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TBGBeT Offline
      TBGBe @moles42
      last edited by

      Thanks Micke,
      Seems to work fine.

      Is there a way to specify year/month/day for date instead of day/month/year ?

      MickeM 1 Reply Last reply Reply Quote 0
      • MickeM Offline
        Micke Alpha Testers @TBGBe
        last edited by

        @TBGBe:

        Thanks Micke,
        Seems to work fine.

        Is there a way to specify year/month/day for date instead of day/month/year ?

        I don’t know if that’s possible, but I’ll check that. I also found one annoying bug in the script, that I missed when I wrote it. I have assumed that the file extension always is 3 characters, but that won’t work when you are working with 7-zip (7z) and zipx archives since they don’t have a file extension of 3 characters. This resulted in a incorrect filename after adding date and time to it.

        I need to do some more tests before I submit the updated script.

        Kind Regards
        Micke

        TBGBeT 1 Reply Last reply Reply Quote 0
        • TBGBeT Offline
          TBGBe @Micke
          last edited by

          Yeah. I was just about to report that “test.tar.gz” doesn’t work.
          I guess you know why :p

          1 Reply Last reply Reply Quote 0
          • MickeM Offline
            Micke Alpha Testers
            last edited by

            Hi!
            I think it’s working correctly now. I have also update the date parameter. You can now select from different date format.

            Here’s the updated script

            '***********************************************************************
            '* PACOMP_DT.vbs
            '* @author: Micke
            '* @hist 2010-04-05	CREATED:Script for adding Date and Time to Filename
            '* @hist 2010-04-06 BUGFIX: Assumed the file extension always contains
            '*							3 character, resulting in incorrect
            '*							Filename when using a file extension with
            '*							other than 3 characters.
            '* @hist 2010-04-06	UPDATE:	Added support for different dateformat
            '*
            '* The script requires 4 parameters
            '* Usage: cscript PACOMP_DT.vbs <param1> <param2> <param3> <param4>
            '*
            '* param1: 	-d1 = Add current date (YYYYMMDD) to filename
            '*			-d2 = Add current date (DDMMYYYY) to filename
            '*			-d3 = Add current date (MMDDYYYY) to filename
            '*			-d = Works the same as -d1
            '* 			-t = Add current time to filename
            '*			-dt = Add current date and time to filename
            '*
            '* param2:	The commands PACOMP uses
            '* param3:	Filename of the Archive with extension
            '* param4:	Path to file(s) and/or directory
            '*
            '* Add date and time to Archivename MyArchive.zip
            '* Example: cscript PACOMP_DT.vbs -dt -a C:\Temp\MyArchive.zip D:\*.doc
            '*
            '***********************************************************************
            Option Explicit
            
            'Variables
            Dim FSO, WshShell, objRegEx, strDate, strDT_Parameter, strArchiveExtension
            Dim strTime, strArchiveNamePath, strPACOMP_Commands, strFileName
            Dim strOnlyArchiveName, strPath, strOnlyArchiveNameNoExtension
            Dim strCompressionString, bCheck
            
            'Constants
            Const PACOMP = "C:\Programs\PACL\PACOMP.exe"
            
            'Check number of arguments
            If WScript.Arguments.Count <> 4 Then
            	WScript.Echo "Usage: cscript PACOMP_DT.vbs <param1> <param2> <param3> <param4>"
            	WScript.Echo "param1: -d1 = Add current date (YYYYMMDD) to filename"
            	WScript.Echo "param1: -d2 = Add current date (DDMMYYYY) to filename"
            	WScript.Echo "param1: -d3 = Add current date (MMDDYYYY) to filename"
            	WScript.Echo "param1: -d = Works the same as -d1"
            	WScript.Echo "param1: -t = Add current time to filename"
            	WScript.Echo "param1: -dt = Add current date and time to filename"
            	WScript.Echo "param2: The commands PACOMP uses"
            	WScript.Echo "param3: Filename of the Archive with extension"
            	WScript.Echo "param4: Path to file(s) and/or directory"
            	WScript.Echo "Example: cscript PACOMP_DT.vbs -dt -a C:\Temp\MyArchive.zip D:\*.doc"
            	WScript.Echo "Will add date and time to Archivename MyArchive.zip"
            	WScript.Quit
            End If
            
            'Create the FileSystemObject
            Set FSO = CreateObject("Scripting.FileSystemObject")
            
            'Create the ShellObject
            Set WshShell = CreateObject("WScript.Shell")
            
            'Get data from the Arguments
            strDT_Parameter = WScript.Arguments.Item(0)
            strPACOMP_Commands = WScript.Arguments.Item(1)
            strArchiveNamePath = WScript.Arguments.Item(2)
            strFileName = WScript.Arguments.Item(3)
            
            'Check the parameter for Date and Time
            If CheckDTParameter() = True Then
            	UpdateArchiveName()
            	RunPACOMP()
            Else
            	WScript.Echo "Parameter 1 incorrect"
            	WScript.Echo "Value set as: " & strDT_Parameter
            	WScript.Echo "Expected value would be: -t, -d, -d1, -d2,-d3, -dt, -d1t, -d2t, -d3t"
            	WScript.Echo "Exit the script"
            	WScript.Quit
            End If
            
            Sub UpdateArchiveName()
            
            	'Get the ArchiveName from the path
            	strOnlyArchiveName = Mid(strArchiveNamePath, InStrRev(strArchiveNamePath, "\")+1)
            
            	'Get the ArchiveExtension
            	strArchiveExtension = Mid(strArchiveNamePath, InStrRev(strArchiveNamePath, ".")+1)
            
            	'Get the ArchiveName without extension
            	strOnlyArchiveNameNoExtension = Left(strOnlyArchiveName, Len(strOnlyArchiveName)-Len(strArchiveExtension)-1)
            
            	'Get the Path without the ArchiveName
            	strPath = Left(strArchiveNamePath,Len(strArchiveNamePath)-Len(strOnlyArchiveName))
            
            	'Insert Date and Time to the ArchiveName
            	If strDT_Parameter = "-d" Or strDT_Parameter = "-d1" Or strDT_Parameter = "-d2" Or strDT_Parameter = "-d3" Then
            		strOnlyArchiveName = strOnlyArchiveNameNoExtension & "_" & strDate & "." & strArchiveExtension
            	ElseIf strDT_Parameter = "-t" Then
            		strOnlyArchiveName = strOnlyArchiveNameNoExtension & "_" & strTime & "." & strArchiveExtension
            	Else
            		strOnlyArchiveName = strOnlyArchiveNameNoExtension & "_" & strDate & "_" & strTime & "." & strArchiveExtension
            	End If
            
            	strArchiveNamePath = strPath & strOnlyArchiveName
            
            End Sub
            
            Sub RunPACOMP()
            
            	'Create the string with parameters for PACOMP
            	strCompressionString = PACOMP & " " & strPACOMP_Commands & " " & Chr(34) & strArchiveNamePath & Chr(34) & " " & Chr(34) & strFileName & Chr(34)
            	WScript.Echo strCompressionString
            	WshShell.Run strCompressionString, 0, True
            
            End Sub
            
            Function FormatNumbers(n, totalDigits)
            
            	If totalDigits > Len(n) Then
            		FormatNumbers = String(totalDigits-Len(n),"0") & n 
                Else 
                    FormatNumbers = n 
               	End If
            
            End Function
            
            Function CheckDTParameter()
            
            	Select Case strDT_Parameter
            		Case "-d" 'YYYYMMDD
            			bCheck = True
            			strDate = Year(Date()) & FormatNumbers(Month(Date()),2) & FormatNumbers(Day(Date()),2)
            		Case "-d1" 'YYYYMMDD
            			bCheck = True
            			strDate = Year(Date()) & FormatNumbers(Month(Date()),2) & FormatNumbers(Day(Date()),2)
            		Case "-d2" 'DDMMYYYY
            			bCheck = True
            			strDate = FormatNumbers(Day(Date()),2) & FormatNumbers(Month(Date()),2) & Year(Date())
            		Case "-d3" 'MMDDYYYY
            			bCheck = True
            			strDate = FormatNumbers(Month(Date()),2) & FormatNumbers(Day(Date()),2) & Year(Date())
            		Case "-t" 'HHMMSS
            			bCheck = True
            			GetFormattedTime()
            		Case "-dt" 'YYYYMMDD HHMMSS
            			bCheck = True
            			strDate = Year(Date()) & FormatNumbers(Month(Date()),2) & FormatNumbers(Day(Date()),2)
            			GetFormattedTime()
            		Case "-d1t" 'YYYYMMDD HHMMSS
            			bCheck = True
            			strDate = Year(Date()) & FormatNumbers(Month(Date()),2) & FormatNumbers(Day(Date()),2)
            			GetFormattedTime()
            		Case "-d2t" 'DDMMYYYY HHMMSS
            			bCheck = True
            			strDate = FormatNumbers(Day(Date()),2) & FormatNumbers(Month(Date()),2) & Year(Date())
            			GetFormattedTime()
            		Case "-d3t" 'MMDDYYYY HHMMSS
            			bCheck = True
            			strDate = FormatNumbers(Month(Date()),2) & FormatNumbers(Day(Date()),2) & Year(Date())
            			GetFormattedTime()
            		Case Else
            			bCheck = False
            	End Select
            
            	CheckDTParameter = bCheck
            
            End Function
            
            Sub GetFormattedTime()
            
            	'Clear unwanted characters from the date and time
            	Set objRegEx = CreateObject("VBScript.RegExp")
            	objRegEx.Global = True
            	objRegEx.Pattern = "[^0-9]"
            
            	'Find out current time
            	strTime = FormatDateTime(Time(), vbLongTime)
            
            	'Clear unwanted characters from the date and time
            	strTime = objRegEx.Replace(strTime, "")
            
            End Sub</param4> </param3></param2></param1></param4></param3></param2></param1>
            

            The script requires 4 parameters to work properly.

            Parameter 1
            Can be “-d”, “-d1”, “-d2”, “-d3”, “-t”, “-dt”, “-d1t”, “-d2t”, “-d3t”
            -d = Add current date (YYYYMMDD) to the ArchiveName
            -d1 = Add current date (YYYYMMDD) to the ArchiveName
            -d2 = Add current date (DDMMYYYY) to the ArchiveName
            -d3 = Add current date (MMDDYYYY) to the ArchiveName
            -t = Add current time to the ArchiveName
            -dt = Add current date and time to the ArchiveName

            Parameter 2
            The commands PACOMP uses. Note: The script doesn’t check if the commands are valid for PACOMP, it only check that this parameter exists. Also note: If you have more than one command in this parameter {-a -p}, you have to put quotes around these {“-a -p”}, otherwise you’ll get an error as the script will take each command for a separate parameter.

            Parameter 3
            Filename of the Archive with extension

            Parameter 4
            Files to add to the Archive

            Example

            cscript PACOMP_DT.vbs -dt -a C:\Temp\MyArchive.zip D:\*.doc
            cscript PACOMP_DT.vbs -dt "-a -P" C:\Temp\MyArchiveTest.zip D:\Temp\*.*
            cscript PACOMP_DT.vbs -d2t -a C:\Temp\MyArchive.zip D:\*.doc
            
            

            I hope everything is working correctly now.

            Kind Regards
            Micke

            TBGBeT 1 Reply Last reply Reply Quote 0
            • TBGBeT Offline
              TBGBe @Micke
              last edited by

              Sorry, still fails with name2.tar.gz or name2.tar.bz2

              Could it be the “doubled extension” (two dots) causing problems with

              'Get the ArchiveExtension
              strArchiveExtension = Mid(strArchiveNamePath, InStrRev(strArchiveNamePath, “.”)+1)

              MickeM 1 Reply Last reply Reply Quote 0
              • MickeM Offline
                Micke Alpha Testers @TBGBe
                last edited by

                @TBGBe:

                Sorry, still fails with name2.tar.gz or name2.tar.bz2

                Could it be the “doubled extension” (two dots) causing problems with

                Well, it’s working as expected for me. name2.tar.gz will have the fileextension “gz” and the new filename will be name2.tar_YYYYMMDD_HHMMSS.gz

                I assume you want the date and time appear before the first dot, which would be like name2_YYYYMMDD_HHMMSS.tar.gz

                Is that correct?

                Kind Regards
                Micke

                TBGBeT 1 Reply Last reply Reply Quote 0
                • TBGBeT Offline
                  TBGBe @Micke
                  last edited by

                  @Micke:

                  Well, it’s working as expected for me. name2.tar.gz will have the fileextension “gz” and the new filename will be name2.tar_YYYYMMDD_HHMMSS.gz

                  Yes, but PACOMP cannot create the archive as it needs "tar.gz / tar.bz2 " to perform the compression :p

                  @Micke:

                  I assume you want the date and time appear before the first dot, which would be like name2_YYYYMMDD_HHMMSS.tar.gz

                  Is that correct?

                  Kind Regards
                  Micke

                  Yes - well at least before the archive type control extension (don’t know if there might be something like
                  “create.this.archive.for.me.tar.gz” which works in PACL!! )

                  However, this is getting too complicated.
                  I would be happy just to PREFIX the archive name with time/date to give
                  YYYYMMDD_HHMMSS_name2.tar.gz
                  which I guess is much simpler (and clarifies why I asked for YEAR/Month/Day format).

                  MickeM 2 Replies Last reply Reply Quote 0
                  • MickeM Offline
                    Micke Alpha Testers @TBGBe
                    last edited by

                    @TBGBe:

                    Yes, but PACOMP cannot create the archive as it needs "tar.gz / tar.bz2 " to perform the compression :p

                    Ok, then the date and time must be placed before the first dot in the filename

                    @TBGBe:

                    However, this is getting too complicated. I would be happy just to PREFIX the archive name with time/date to give
                    YYYYMMDD_HHMMSS_name2.tar.gz
                    which I guess is much simpler (and clarifies why I asked for YEAR/Month/Day format).

                    It’s not that complicated, the problem here is to know all the rules for the fileextension used in PACL before writning the script. I was assuming that we would have filename.extension in all archives.

                    It’s much simpler to add the date and time in the beginning of the filename. The reason for adding it between the name and the extension is that it will be easier when you list the archives in explorer and they begin with their original filename and the date and time is inside it.

                    I’ll fix this by adding the date and time before the first dot in the filename instead of the last dot.

                    Kind Regards
                    Micke

                    1 Reply Last reply Reply Quote 0
                    • MickeM Offline
                      Micke Alpha Testers @TBGBe
                      last edited by

                      Hi TBGBe!

                      @TBGBe:

                      Yes, but PACOMP cannot create the archive as it needs "tar.gz / tar.bz2 " to perform the compression :p

                      I have tested this and both creation and extraction of archive work with filename like Test1.tar_20100407_213915.bz2 or Test2.tar_20100407_213915.gz

                      C:\Programs\PACL>pacomp -a Test1.tar_20100407_213915.bz2 *.txt
                      
                      Archive: C:\Programs\PACL\Test1.tar_20100407_213915.bz2
                        preparing to compress...
                        adding: filelist.txt   --> Done. [0%]
                        adding: filelist2.txt   --> Done. [0%]
                        adding: LICENSE.TXT   --> Done. [22%]
                        adding: MANUAL.TXT   --> Done. [59%]
                        adding: ORDER.TXT   --> Done. [62%]
                        adding: README.TXT   --> Done. [77%]
                        adding: WHATSNEW.TXT   --> Done. [100%]
                        BZIPing... please wait...
                      
                      All OK
                      
                      C:\Programs\PACL>
                      
                      
                      C:\Programs\PACL>paext -e -pc:\Programs\Temp Test1.tar_20100407_213915.bz2
                      Archive --> C:\Programs\PACL\Test1.tar_20100407_213915.bz2 [BZIPed TAR]
                      
                        extracting: filelist.txt   --> Done. [0%]
                        extracting: filelist2.txt   --> Done. [0%]
                        extracting: LICENSE.TXT   --> Done. [22%]
                        extracting: MANUAL.TXT   --> Done. [59%]
                        extracting: ORDER.TXT   --> Done. [62%]
                        extracting: README.TXT   --> Done. [77%]
                        extracting: WHATSNEW.TXT   --> Done. [100%]
                      
                      C:\Programs\PACL>
                      
                      
                      C:\Programs\PACL>pacomp -a Test2.tar_20100407_213915.gz *.txt
                      Archive: C:\Programs\PACL\Test2.tar_20100407_213915.gz
                        preparing to compress...
                        adding: filelist.txt   --> Done. [0%]
                        adding: filelist2.txt   --> Done. [0%]
                        adding: LICENSE.TXT   --> Done. [22%]
                        adding: MANUAL.TXT   --> Done. [59%]
                        adding: ORDER.TXT   --> Done. [62%]
                        adding: README.TXT   --> Done. [77%]
                        adding: WHATSNEW.TXT   --> Done. [100%]
                        GZIPing... please wait...
                      
                      All OK
                      
                      C:\Programs\PACL>
                      
                      
                      C:\Programs\PACL>paext -e -pc:\Programs\Temp Test2.tar_20100407_213915.gz
                      Archive --> C:\Programs\PACL\Test2.tar_20100407_213915.gz [GZIPed TAR]
                      
                        extracting: filelist.txt   --> Done. [0%]
                        extracting: filelist2.txt   --> Done. [0%]
                        extracting: LICENSE.TXT   --> Done. [22%]
                        extracting: MANUAL.TXT   --> Done. [59%]
                        extracting: ORDER.TXT   --> Done. [62%]
                        extracting: README.TXT   --> Done. [77%]
                        extracting: WHATSNEW.TXT   --> Done. [100%]
                      
                      C:\Programs\PACL>
                      
                      ```Maybe I have missed something here :confused: but it seems to work properly for me.
                      
                      Kind Regards
                      Micke
                      TBGBeT 1 Reply Last reply Reply Quote 0
                      • TBGBeT Offline
                        TBGBe @Micke
                        last edited by

                        Hmm, perhaps I’m missing something then - I get this when running the script
                        attachment_p_22186_0_pacomp_dt.001.png

                        MickeM 1 Reply Last reply Reply Quote 0
                        • MickeM Offline
                          Micke Alpha Testers @TBGBe
                          last edited by

                          @TBGBe:

                          Hmm, perhaps I’m missing something then - I get this when running the script

                          Hmm, I can see one thing that could get this error. In the script there’s one constant

                          Const PACOMP = "C:\Programs\PACL\PACOMP.exe"
                          
                          

                          You are in C:\PACL when you are running the script and the commandline starts with “C:\Programs\PACL\PACOMP.exe”, but are you sure you have PACL installed in that folder? I know I haven’t comment the script about that you have to change this line, because the constant is the same as I have used in previous scripts.

                          Kind Regards
                          Micke

                          TBGBeT 1 Reply Last reply Reply Quote 0
                          • MickeM Offline
                            Micke Alpha Testers
                            last edited by

                            Hi!
                            Here’s the updated script. Now the date and time always is placed before the first dot in the filename, like this.

                            MyArchive_YYYYMMDD_HHMMSS.properties.txt.tar.bz2

                            I have also put a check if PACOMP.exe exists in the specified path of the constant. If not, a message will tell you about it and the script will exit.

                            '***********************************************************************
                            '* PACOMP_DT.vbs
                            '* @author: Micke
                            '* @hist 2010-04-05	CREATED:Script for adding Date and Time to Filename
                            '* @hist 2010-04-06 BUGFIX: Assumed the file extension always contains
                            '*							3 character, resulting in incorrect
                            '*							Filename when using a file extension with
                            '*							other than 3 characters.
                            '* @hist 2010-04-06	UPDATE:	Added support for different dateformat
                            '* @hist 2010-04-08 UPDATE:	Added check for existing PACOMP in the
                            '*							specified path
                            '* @hist 2010-04-08 UPDATE:	Moved date and time to be placed before
                            '*							the first dot in the filename
                            '*
                            '* The script requires 4 parameters
                            '* Usage: cscript PACOMP_DT.vbs <param1> <param2> <param3> <param4>
                            '*
                            '* param1: 	-d1 = Add current date (YYYYMMDD) to filename
                            '*			-d2 = Add current date (DDMMYYYY) to filename
                            '*			-d3 = Add current date (MMDDYYYY) to filename
                            '*			-d = Works the same as -d1
                            '* 			-t = Add current time to filename
                            '*			-dt = Add current date and time to filename
                            '*
                            '* param2:	The commands PACOMP uses
                            '* param3:	Filename of the Archive with extension
                            '* param4:	Path to file(s) and/or directory
                            '*
                            '* Add date and time to Archivename MyArchive.zip
                            '* Example: cscript PACOMP_DT.vbs -dt -a C:\Temp\MyArchive.zip D:\*.doc
                            '*
                            '***********************************************************************
                            Option Explicit
                            
                            'Variables
                            Dim FSO, WshShell, objRegEx, strDate, strDT_Parameter, strArchiveExtension
                            Dim strTime, strArchiveNamePath, strPACOMP_Commands, strFileName
                            Dim strOnlyArchiveName, strPath, strOnlyArchiveNameNoExtension
                            Dim strCompressionString, bCheck
                            
                            'Constants
                            Const PACOMP = "C:\Programs\PACL\PACOMP.exe"
                            
                            'Check number of arguments
                            If WScript.Arguments.Count <> 4 Then
                            	WScript.Echo "Usage: cscript PACOMP_DT.vbs <param1> <param2> <param3> <param4>"
                            	WScript.Echo "param1: -d1 = Add current date (YYYYMMDD) to filename"
                            	WScript.Echo "param1: -d2 = Add current date (DDMMYYYY) to filename"
                            	WScript.Echo "param1: -d3 = Add current date (MMDDYYYY) to filename"
                            	WScript.Echo "param1: -d = Works the same as -d1"
                            	WScript.Echo "param1: -t = Add current time to filename"
                            	WScript.Echo "param1: -dt = Add current date and time to filename"
                            	WScript.Echo "param2: The commands PACOMP uses"
                            	WScript.Echo "param3: Filename of the Archive with extension"
                            	WScript.Echo "param4: Path to file(s) and/or directory"
                            	WScript.Echo "Example: cscript PACOMP_DT.vbs -dt -a C:\Temp\MyArchive.zip D:\*.doc"
                            	WScript.Echo "Will add date and time to Archivename MyArchive.zip"
                            	WScript.Quit
                            End If
                            
                            'Create the FileSystemObject
                            Set FSO = CreateObject("Scripting.FileSystemObject")
                            
                            'Create the ShellObject
                            Set WshShell = CreateObject("WScript.Shell")
                            
                            'Get data from the Arguments
                            strDT_Parameter = WScript.Arguments.Item(0)
                            strPACOMP_Commands = WScript.Arguments.Item(1)
                            strArchiveNamePath = WScript.Arguments.Item(2)
                            strFileName = WScript.Arguments.Item(3)
                            
                            'Check that PACOMP exists in the specified path
                            If FSO.FileExists(PACOMP) Then
                            	WScript.Echo "PACOMP.exe found, ok to continue the script"
                            Else
                            	WScript.Echo "PACOMP.exe could not be found in the specified path"
                            	WScript.Echo "The path is set to: " & PACOMP
                            	WScript.Echo "Update the constant PACOMP to contain a valid path"
                            	WScript.Echo "Exit the script"
                            	WScript.Quit
                            End If
                            
                            'Check the parameter for Date and Time
                            If CheckDTParameter() = True Then
                            	UpdateArchiveName()
                            	RunPACOMP()
                            Else
                            	WScript.Echo "Parameter 1 incorrect"
                            	WScript.Echo "Value set as: " & strDT_Parameter
                            	WScript.Echo "Expected value would be: -t, -d, -d1, -d2,-d3, -dt, -d1t, -d2t, -d3t"
                            	WScript.Echo "Exit the script"
                            	WScript.Quit
                            End If
                            
                            Sub UpdateArchiveName()
                            
                            	'Get the ArchiveName from the path
                            	strOnlyArchiveName = Mid(strArchiveNamePath, InStrRev(strArchiveNamePath, "\")+1)
                            
                            	'Get the ArchiveExtension
                            	strArchiveExtension = Mid(strArchiveNamePath, InStr(strArchiveNamePath, ".")+1)
                            
                            	'Get the ArchiveName without extension
                            	strOnlyArchiveNameNoExtension = Left(strOnlyArchiveName, Len(strOnlyArchiveName)-Len(strArchiveExtension)-1)
                            
                            	'Get the Path without the ArchiveName
                            	strPath = Left(strArchiveNamePath,Len(strArchiveNamePath)-Len(strOnlyArchiveName))
                            
                            	'Insert Date and Time to the ArchiveName
                            	If strDT_Parameter = "-d" Or strDT_Parameter = "-d1" Or strDT_Parameter = "-d2" Or strDT_Parameter = "-d3" Then
                            		strOnlyArchiveName = strOnlyArchiveNameNoExtension & "_" & strDate & "." & strArchiveExtension
                            	ElseIf strDT_Parameter = "-t" Then
                            		strOnlyArchiveName = strOnlyArchiveNameNoExtension & "_" & strTime & "." & strArchiveExtension
                            	Else
                            		strOnlyArchiveName = strOnlyArchiveNameNoExtension & "_" & strDate & "_" & strTime & "." & strArchiveExtension
                            	End If
                            
                            	strArchiveNamePath = strPath & strOnlyArchiveName
                            
                            End Sub
                            
                            Sub RunPACOMP()
                            
                            	'Create the string with parameters for PACOMP
                            	strCompressionString = PACOMP & " " & strPACOMP_Commands & " " & Chr(34) & strArchiveNamePath & Chr(34) & " " & Chr(34) & strFileName & Chr(34)
                            	WScript.Echo strCompressionString
                            	WshShell.Run strCompressionString, 0, True
                            
                            End Sub
                            
                            Function FormatNumbers(n, totalDigits)
                            
                            	If totalDigits > Len(n) Then
                            		FormatNumbers = String(totalDigits-Len(n),"0") & n 
                                Else 
                                    FormatNumbers = n 
                               	End If
                            
                            End Function
                            
                            Function CheckDTParameter()
                            
                            	Select Case strDT_Parameter
                            		Case "-d" 'YYYYMMDD
                            			bCheck = True
                            			strDate = Year(Date()) & FormatNumbers(Month(Date()),2) & FormatNumbers(Day(Date()),2)
                            		Case "-d1" 'YYYYMMDD
                            			bCheck = True
                            			strDate = Year(Date()) & FormatNumbers(Month(Date()),2) & FormatNumbers(Day(Date()),2)
                            		Case "-d2" 'DDMMYYYY
                            			bCheck = True
                            			strDate = FormatNumbers(Day(Date()),2) & FormatNumbers(Month(Date()),2) & Year(Date())
                            		Case "-d3" 'MMDDYYYY
                            			bCheck = True
                            			strDate = FormatNumbers(Month(Date()),2) & FormatNumbers(Day(Date()),2) & Year(Date())
                            		Case "-t" 'HHMMSS
                            			bCheck = True
                            			GetFormattedTime()
                            		Case "-dt" 'YYYYMMDD HHMMSS
                            			bCheck = True
                            			strDate = Year(Date()) & FormatNumbers(Month(Date()),2) & FormatNumbers(Day(Date()),2)
                            			GetFormattedTime()
                            		Case "-d1t" 'YYYYMMDD HHMMSS
                            			bCheck = True
                            			strDate = Year(Date()) & FormatNumbers(Month(Date()),2) & FormatNumbers(Day(Date()),2)
                            			GetFormattedTime()
                            		Case "-d2t" 'DDMMYYYY HHMMSS
                            			bCheck = True
                            			strDate = FormatNumbers(Day(Date()),2) & FormatNumbers(Month(Date()),2) & Year(Date())
                            			GetFormattedTime()
                            		Case "-d3t" 'MMDDYYYY HHMMSS
                            			bCheck = True
                            			strDate = FormatNumbers(Month(Date()),2) & FormatNumbers(Day(Date()),2) & Year(Date())
                            			GetFormattedTime()
                            		Case Else
                            			bCheck = False
                            	End Select
                            
                            	CheckDTParameter = bCheck
                            
                            End Function
                            
                            Sub GetFormattedTime()
                            
                            	'Clear unwanted characters from the date and time
                            	Set objRegEx = CreateObject("VBScript.RegExp")
                            	objRegEx.Global = True
                            	objRegEx.Pattern = "[^0-9]"
                            
                            	'Find out current time
                            	strTime = FormatDateTime(Time(), vbLongTime)
                            
                            	'Clear unwanted characters from the date and time
                            	strTime = objRegEx.Replace(strTime, "")
                            
                            End Sub</param4> </param3></param2></param1></param4></param3></param2></param1>
                            

                            Kind Regards
                            Micke

                            1 Reply Last reply Reply Quote 0
                            • TBGBeT Offline
                              TBGBe @Micke
                              last edited by

                              @Micke:

                              Hmm, I can see one thing that could get this error. In the script there’s one constant

                              Const PACOMP = "C:\Programs\PACL\PACOMP.exe"
                              
                              

                              You are in C:\PACL when you are running the script

                              Blush :o

                              However, when I remembered to change it, I still have a problem opening the archive using PowerArchiver (not PACL) as it doesn’t handle the tar file because of the date text.

                              @Micke:

                              Here’s the updated script.

                              OK this works well for me now - thanks a lot. :D

                              MickeM 1 Reply Last reply Reply Quote 0
                              • MickeM Offline
                                Micke Alpha Testers @TBGBe
                                last edited by

                                @TBGBe:

                                OK this works well for me now - thanks a lot. :D

                                No problem, however it was a little more job to get it running the way I wanted than I expected in the beginning.

                                I suspect the next script will be much more complicated than this one. I haven’t sorted out yet how to solve all the problems in it, but it will be a different way of using PACL to create archives.

                                Kind Regards
                                Micke

                                TBGBeT 1 Reply Last reply Reply Quote 0
                                • TBGBeT Offline
                                  TBGBe @Micke
                                  last edited by

                                  @Micke:

                                  … it will be a different way of using PACL to create archives.

                                  A GUI perhaps :p

                                  1 Reply Last reply Reply Quote 0
                                  • guidoG Offline
                                    guido
                                    last edited by

                                    see http://www.autoitscript.com/autoit3/index.shtml for a simple GUI builder. it’s perfect for a wrapper around a command line tool

                                    Windows 11 Pro ENU x64
                                    Intel Core I7
                                    32 GB RAM

                                    1 Reply Last reply Reply Quote 0
                                    • MickeM Offline
                                      Micke Alpha Testers
                                      last edited by

                                      I have no plans for a GUI, as PA already has a very good and powerful GUI. I also want to thank TBGBe for taking time to test the script. Without your help I wouldn’t find the problem with extensions like tar.gz and tar.bz2.

                                      I haven’t written the next upcoming script yet, but I have some ideas of what it should be able to do. You will see it when it’s ready for test.

                                      Kind Regards
                                      Micke

                                      TBGBeT 1 Reply Last reply Reply Quote 0
                                      • TBGBeT Offline
                                        TBGBe @Micke
                                        last edited by

                                        @Micke:

                                        I have no plans for a GUI …

                                        That was meant to be a joke - not sure if Guido knew it.

                                        P.S. Welcome back Guido :cool:

                                        1 Reply Last reply Reply Quote 0
                                        • guidoG Offline
                                          guido
                                          last edited by

                                          I was never gone. I was always watching you guys big brother style. I just had nothing interesting to report. :-)

                                          Windows 11 Pro ENU x64
                                          Intel Core I7
                                          32 GB RAM

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post