VB Script to move a file with date in name

I'm so stuck but I know Im close.  So its friday and I'm brain dead and I'm asking for some help please.
I have FILES starting with dates
140729HDF0.835
140730HES0.835
140731UHG0.835
and I need to move the files that are dated in the file's 2 days back.
Dim ObjFso
Dim SourceLocation
Dim DestinationLocation
Dim FileName
Set ObjFso = CreateObject("Scripting.FileSystemObject")
dteYesterday = DateAdd("d", -1, Date)
SourceLocation = "c:\835old"
DestinationLocation = "c:\835new"
FileName = (Year(dteYesterday), 2) & Right("0" & Month(dteYesterday), 2) & Right("0" & Day(dteYesterday), 2) & ".835"
ObjFso.MoveFile SourceLocation & "\" & FileName, DestinationLocation & "\"
It's something in my FileName= because if I simply change it to
FileName = "*.835"
its works.  Can anyone help please??

This approximates what you need to do:
Set fso = CreateObject("Scripting.FileSystemObject")
strFileDate = Right(Year(Now-1),2) & Right("0" & Month(Now-1),2) & Right("0" & Day(Now-1),2)
source = "c:\835old"
destination = "c:\835new"
folder = fso.GetFolder(source)
For Each fi In folder.Files
If Left(fi.Name,6) = strFileDate Then
fso.MoveFile fi, destination
End If
Next
¯\_(ツ)_/¯

Similar Messages

  • Append a file with date and name in the output file

    I am running a script which produce an output in excel file, I would like the server name and the date in the output file,  Both the servername and date has declared at the beginning of the script as 
    $server = test1
    $date = Get-Date -uformat %Y-%m-%d
    I am able to append either server or date but not both. Could you please help me out on this.
    I would like the output file as '
    server_report_date.xls

    I got this working by 
    "C:\Aravind\Scripts\$server-"+"Report-" +"$Date"+".xls"
    Thanks!!

  • How to Run Export and Make Dump and Log File with Dates on NT

    Hi Gurus,
    set ORACLE_SID=ORCL
    set ORACLE_HOME=D:\ORACLE\ora92
    for /f "tokens=2,3,4 delims=/ " %%a in ('date /t') do
    set fdate=%%a%%b%%c
    exp userid=userid/password@connectstring
    file=exp%fdate%.dmp log=exp%fdate%.log full=y
    I am using above script for export and make dump file with dates, but when i am excuting this script with Schedule task i am getting error.
    C:\Documents and Settings\krishna>for /f "tokens=2,3,4 delims=/ " %%a in ('date
    /t') do
    %%a was unexpected at this time.
    Help is highly appriciated.
    Thanks & Regards
    praveen

    HOST('EXP80 MRPAY/MRPAYS FILE=D:\BACKUP\MRPAY'||TO_CHAR(SYSDATE,'DDMMRRHH24MI')||'.DMP OWNER=MRPAY CONSISTENT=Y');
    HOST('EXP80 SECSYS/SECSYS FILE=D:\BACKUP\SECSYS'||TO_CHAR(SYSDATE,'DDMMRRHH24MI')||'.DMP OWNER=SECSYS CONSISTENT=Y');
    HOST('EXP80 SICPA/SICPA FILE=D:\BACKUP\SICPA'||TO_CHAR(SYSDATE,'DDMMRRHH24MI')||'.DMP OWNER=SICPA CONSISTENT=Y');
    HOST('EXP80 SICPAINVSYS/SICPAINVSYS FILE=D:\BACKUP\SICPAINVSYS'||TO_CHAR(SYSDATE,'DDMMRRHH24MI')||'.DMP OWNER=SICPAINVSYS CONSISTENT=Y');
    HOST('EXP80 SICPAGLSYS/SICPAGLSYS FILE=D:\BACKUP\SICPAGLSYS'||TO_CHAR(SYSDATE,'DDMMRRHH24MI')||'.DMP OWNER=SICPAGLSYS CONSISTENT=Y');
    HOST('EXP80 SICPAPURHSYS/SICPAPURHSYS FILE=D:\BACKUP\SICPAPURHSYS'||TO_CHAR(SYSDATE,'DDMMRRHH24MI')||'.DMP OWNER=SICPAPURHSYS CONSISTENT=Y');
    HOST('EXP80 SICPARECSYS/SICPARECSYS FILE=D:\BACKUP\SICPARECSYS'||TO_CHAR(SYSDATE,'DDMMRRHH24MI')||'.DMP OWNER=SICPARECSYS CONSISTENT=Y');
    HOST('EXP80 SICPASECSYS/SICPASECSYS FILE=D:\BACKUP\SICPASECSYS'||TO_CHAR(SYSDATE,'DDMMRRHH24MI')||'.DMP OWNER=SICPASECSYS CONSISTENT=Y');
    HOST('EXP80 FASYS/FASYS FILE=D:\BACKUP\FASYS'||TO_CHAR(SYSDATE,'DDMMRRHH24MI')||'.DMP OWNER=FASYS CONSISTENT=Y');
    HOST('EXP80 ATTSYS/ATTSYS FILE=D:\BACKUP\ATTSYS'||TO_CHAR(SYSDATE,'DDMMRRHH24MI')||'.DMP OWNER=ATTSYS CONSISTENT=Y');
    HOST('EXP80 ATTENDANCESYSTEM/ATTENDANCESYSTEM FILE=D:\BACKUP\ATTENDANCESYSTEM'||TO_CHAR(SYSDATE,'DDMMRRHH24MI')||'.DMP OWNER=ATTENDANCESYSTEM CONSISTENT=Y');
    Arshad

  • I need to create an action or script to save the file with the name of the selected layer

    I need to create an action or script to save the file with the name of the selected layer (not including the hidden layers, but including those visible).
    How could modify the script: 'Layer Comps To Files.jsx' to get the result?
    Warning: I do not need to export all layers as files.
    Who can help me?
    THX in advance

    Versione in Italiano (Further down the English version)
    NB - Nella versione inglese ho messo tutte le immagini dei menu in italiano.
    Versione per Mac, ma credo sia identico per Windows.
    Spiego passo passo cosa ho fatto:
    - Ho creato un file esempio con tre Livelli, salvato sulla scrivania e ho chiuso il file.
    - Ho aperto il file e selezionato il Livello al centro per iniziare a registrare una azione che ho chiamato: Save with Name of Selected Layer
    - Nuova azione
    - Dare il nome e premere Registra
    Ora salva…
    - Menu --> Livello --> Nuovo --> Livello... e premi -ok-, (lascia il nome che viene mostrato)
    - Ancora una volta Menu --> Livello... --> Nuovo --> Livello... e premi -ok-, (lascia il nome che viene mostrato)
    - Menu --> Livello --> Ordina --> Dietro
    - Menu --> Livello --> Unisci sotto
    - Menu --> Livello --> Unisci visibili
    - Menu --> Livello --> Nuovo --> Livello... e premi -ok-, (lascia il nome che viene mostrato)
    - Menu --> Livello - Nascondi Livello
    - Menu --> Elimina --> Elimina livelli nascosti (press -Yes-)
    - Menu --> Livello --> Nuovo --> Livello... Inserisci questo: 'Move this to the trash' e premi ok
    - Menu --> File --> Script --> Esporta Livelli in File... (Nella finestra che si apre scegliere l’opzione che si desidera, ma togliere il prefisso del nome) e premere -Esegui-
    - Selezionare il pannello Storia cliccare su Elimina premendo -Si- ogni volta che si apre la finestra di dialogo (Ripetere 8 volte questa operazione sino ad arrivare nella storia alla condizione di partenza. Ho visto che è meglio di Ripristina -F12-)
    - Fermare la registrazione.
    A questo punto, mandando in esecuzione questa Azione, ho raggiunto parzialmente l’obiettivo perché i file così creati mantengono, purtroppo, dei prefissi numerici per evitare probabilmente la sovrascrizione di file (credo senza avviso) nel posto dove vengono creati.
    Per ottenere l’obiettivo occorre un nuovo passo ed a proposito di questo riferisco quanto segue:
    ATTENZIONE - L’operazione descritta qui di seguito deve essere fatta su di una copia del file, per cui:
    - Duplicare il file,
    - Spostare l’originale in altra cartella
    - Lavorare sul file duplicato.
    mi riferisco a questo...
    ATTENZIONE - Questa modifica è effettuata a proprio rischio e pericolo ed il sottoscritto non si assume alcuna responsabilità su quanto venga fatto soprattutto da mani inesperte.
    ATTENZIONE - Questa modifica sovrascrive qualsiasi file che abbia nome uguale al layer che viene selezionato più l’estensione del file naturalmente.
    Comunque la modifica è banalissima e a portata di chiunque.
    Procedere così:
    - Chiudere Photoshop
    - Aprire (nel percorso specificato dall’immagine) il file “Export Layers to Files.jsx” (Export Layers To Files.jsx 1.0.0.16) con un editor di testo puro.
    - cercare la stringa (dovrebbe essere in riga 1029)
    var fileNameBody = fileNamePrefix;
    fileNameBody += "_" + zeroSuppress(i, 4);
    fileNameBody += "_" + layerName;
    - sostituirla con:
    var fileNameBody = fileNamePrefix;
    fileNameBody += layerName;
    - cercare la stringa (dovrebbe essere in riga 1047-46)
    var fileNameBody = fileNamePrefix;
    fileNameBody += "_" + zeroSuppress(i, 4) + "s";
    - sostituirla con:
    var fileNameBody = fileNamePrefix;
    fileNameBody += "";
    - salvare e uscire.
    - riavviare Photoshop
    - provare l’azione registrata facendo attenzione che il nome del layer non sia identico al nome di un file già presente altrimenti questo verrà sovrascritto.
    Domanda:
    Perché ho creato livelli che poi ho eliminato ecc.
    Risposta:
    Semplice per evitare errori di esecuzione delle azioni nel caso di operazioni con livelli mancanti o altro.
    Semplice... no?
    English version
    Mac version, but I think it's the same for Windows.
    First of all, I'm translating the actions that I made using the Italian version of Photoshop, you look at the position of the menu that I have chosen to do the work with other languages.
    I explain step by step what I did:
    - I created a sample file with three layers, saved to the desktop and I closed the file.
    - I opened the file and select the layer at the center to start recording an action that I called: Save with Name of the Selected Layer
    - New action
    - Give the name and press Save ( I think it is so in English )
    Now save ...
    - Menu -> Layer - > New —> Layer… and press -ok- , (leave the name that is shown)
    - Once again Menu -> Layer - > New —> Layer… and press -ok- , (leave the name that is shown)
    - Menu -> Layer - > Arrange (order) -> Behind
    - Menu -> Layer - > Merge Down
    - Menu -> Layer - > Merge Visible
    - Menu -> Layer - > New —> Layer… and press -ok- , (leave the name that is shown)
    - Menu -> Layer - Hide Layer
    - Menu - > Delete - > Delete hidden layers (press -Yes- )
    - Menu -> Layer - > New —> Layer… Enter this: ' Move this to the trash ' and press ok
    - Menu -> File - > Scripts -> Export Layers To Files... (In the window that opens select the option you want, but take away the name prefix) and press - Run -
    - Select the History panel and click Delete (on menu opened) pressing -Yes- every time when open the dialog box (8 times Repeat this step until you get into the story to the starting condition. Not use Restore -F12-).
    - Stop recording.
    At this point, by executing this action, I have reached the goal partly because the files created in this way remain, unfortunately, the numerical prefixes to avoid possibly overwriting of files (I think without notice) in the place where they are created.
    To achieve the goal we need a new step and thinking about this as follows:
    WARNING - The operation described below should be made on a copy of the file, so :
    - Duplicate the file
    - Move the original folder to another
    - Work on the duplicate file.
    WARNING - This modification is performed at your own risk and the undersigned assumes no responsibility on what is done mostly by inexperienced hands.
    WARNING - This change will overwrite any files with the same name as the selected layer plus the file extension of course.
    However, the change is trivial and within reach of anyone.
    Proceed as follows:
    - Close Photoshop
    - Open (in the specified path from the image ) file " Export Layers to Files.jsx " (Export Layers To Files.jsx 1.0.0.16) with a pure text editor.
    - Search for the string (should be in line 1029 )
    var = fileNameBody fileNamePrefix ;
    fileNameBody = + "_" + zeroSuppress (i, 4 ) ;
    fileNameBody + = "_ " + layerName ;
    - Replace it with :
    var = fileNameBody fileNamePrefix ;
    fileNameBody + = layerName ;
    - Search for the string (should be in line 1047-46 )
    var = fileNameBody fileNamePrefix ;
    fileNameBody + = "_ " + zeroSuppress (i, 4) + "s" ;
    - Replace it with :
    var = fileNameBody fileNamePrefix ;
    fileNameBody + = "";
    - Save and exit.
    - Restart Photoshop
    - Try the recorded Action, making sure that the layer name is not identical to the name of an existing file otherwise it will be overwritten.
    Question:
    Why I created levels which I then deleted etc..
    Answer:
    Simple to avoid errors of execution of the actions in the case of transactions with missing levels and other.
    Simple ... is not it?
    Sorry for my bad English...
    Thanks in advance for any hint.
    --->>> Please think about this... Adobe <<<---

  • Need to rescue Garage Band Files with Data Rescue II - what kind of files?

    Hi all -
    After a particularly gruesome computer crash, I am trying to reconstruct my lost files using Data Rescue II..... This program goes into the damaged hard drive and downloads all intact files it can find, but it is NOT able to label everything correctly. All it can do is divide things into folders - Audio files, document files, images, mail, misc., and movies. And within these folders are other folders - for instance, in the "Audio" rescued folder, there are hundreds of AIFF files, AIFF1 files, AIFF2, MP3, WAV, m4a, and m4p files.
    My question is: can someone please tell me what the heck a Garage Band project file is? That would save me a lot of time in digging through all this material trying to find one....
    (Don't get me wrong... I'm grateful to have stuff to dig through! I just hope my Garage Band files are intact and recoverable.)
    Has anyone had success saving Garage Band files with Data Rescue II?
    Thanks in advance.

    Aaaagh!
    I spoke too soon. Yes,I did indeed find the file that contained all the files I needed to retrieve (using Disk Rescue II). When my 6-hour download of the 78 GB folder finished, I check the files again, and they weren't located in the orphaned section, but in the Hard Drive section under the normal directory, in a folder called .Trashes - within that there was another folder called "501", which contained all the Garageband files I needed to retrieve. However, when I tried to open the downloaded "rescued" files, they were inside a folder called "Macintosh HD", which could not be opened, and I got a message that said "Could not be opened because you do not have sufficient access privileges." Not only that, but even after 6 hours of (apparently) downloading the 78 GB folder, my hard drive, which had close to 83 GB of free space, said STILL had almost that same amount.
    So did it download anything or not? What was it doing all those 6 hours? I have a file that I can't open, but apparently it's going to be empty anyway.
    Here's the full story, for anyone with the patience to listen and offer advice. It looks like now I'm looking for a way to 1) get the permissions to open the .trashes file so that I can download everything, or 2) figure out a way to get Disk Rescue II to open the files and download them regardless of the permissions.
    Full Story -
    I am pretty sure that my computer crash was caused by working with the newest version of Garageband 08. Ever since buying it and loading it, my computer has been acting funny whenever I use the Garage Band program - I could only record about one in three attempts since the computer kept freezing as soon as I finished recording a line. I would have to use force restart to get going again.
    The day the computer crashed, I was working on a Garage Band project, which kept crashing, and I was also using Finale, Microsoft Word, and iTunes -- all of which are my normal procedure and I'd never had any problems with anything before loading the new Garage Band 08. (See my posts on other discussion topics for more details). After the last freeze, the computer crashed totally and could not be restarted - it would get to the gray screen with the spinning gear and just sit there while the fans ramped up to overload.
    I used Disk Warrior to rescue whatever files I could onto an external hard drive, and I started to download all the Garage Band files. However, the "estimated time to completion" said over 6 hours , so I stopped the download after a minute or so and went on to rescue all the other files that were smaller in size and easier to download - I figured I'd set Disk Warrior to download the whole 78 GB set of Garage Band files overnight while I slept. But....when I went back to begin the download again, I noticed that the directory of Garage Band files went only to the letter "C" instead of all the way to "Z" like my original files had done during that earlier attempt to download. I am assuming that somehow, the directory for the files I download before aborting the attempt (A-C) got exchanged with the directories of the original version (A-Z), but the original directory was no where to be found.
    I decided to try an archive install in the hopes that I could just restart my computer and get the files out by hand. The archive install went fine, and the computer started up fine and got to the log-in screen, which had changed. I now had two blanks - one for user name and one for password, instead of the choices of names. I tried all my user names and passwords, and asked my wife for her names and passcodes, but nothing worked. The computer had apparently re-set all its permissions and User accounts. I tried using Disk Utility to reset the password in its opening screens, but instead of getting several User options, the only one it allowed me to attempt was "System Administrator (root)", and even that wouldn't let me in to change any passwords.
    That's when I downloaded Data Rescue II, which does seem to do a good job of locating lost files. However, since I didn't have permissions to open the computer the last time, I am still apparently facing the same thing when I try to access files copies OFF the computer.
    So I'm not out of the woods yet. I can see the files on the Data Rescue screen, but I don't know whether they have permissions tied to them or not, and if they do, whether the system would let me since I don't know what the passwords and user names have defaulted back to.
    Any advice? Please?

  • How to transport/move a table with data from development to Test to Production

    Hi,
    How to transport/move a table with data from development to Test to Production..? Export-Import a Delivery Unit does only the structure and not the data
    Reg
    Sri

    Hi Sri,
    You cannot transport Data via Transport route in HANA, you can only transport code changes/Structure via DU. For Data movement, you either have a do a export/import from a flat file or replication from a Source System to HANA.
    Thanks Much,
    Abhishek

  • How to import flat file with date in filename on a regular basis

    Hi,
    Using OWB 11gR1
    I have a file that will be delivered to an FTP each night with the date in the filename having the form YYYYMMDD-FILE.txt (ex: 20100326-FILE.txt) that I want to import to an external table.
    Now I've set up the import to the external table but am only able to import files that I specify the name for exactly. I've tried pointing to filenames such as "*-FILE.txt" and "%-FILE.txt" but that only results in errors.
    It must be possible to automatically import files with different filenames but the same structure, or isn't it? Could anyone help me solve this it'd be greatly appreciated.
    Thank you in advance.

    Hi
    For dynamic files you can;
    1. either do the DDL on the external table to point to the file with the changing name
    2Copy the file to a fixed name before using the external table/maps
    3. Use the preprocessor to cat/pipe these files for the external table. See the post here http://blogs.oracle.com/warehousebuilder/2009/06/file_staging_using_external_table_preprocessor.html it shows using gunzip but could simply be doing 'cat' on a bunch of files to standard output
    Cheers
    David

  • Saving a file with data?

    HI, I am wanting to save a file with data, can some one point me in the right direction to a tut or some thing. Thanks.
    OR
    if they could be so kind as to code a simple thing that saves a file (txt) with a word. This would make my day,
    Thansk and all the best Jonathan :o).

    I have sorted what I was wanting to do. there was some code missing from the coding as well as the import function.
    No you don't have to be 'god' but if some one just handed you a russian/english dictionary you would still have a difficult time making a sentance or even a DVD with every thing there is to know speaking gaelic.
    You have to learn more than just the syntax. sorry I'm not the best person in the world for understanding docs etc, but we all have our good points, ask me any thing else on computers and networks I'll give a plain english answer, wood chips and all.
    This is all meant in a good tone, there is the problem with txt that it tend to have a dull sound, so cheer up and smile. I know I am.
    :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o)
    :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o) :o)

  • I'm trying to put movies onto my hard  drive but i can't put the files with the same name onto the hard drive , finder won't let me change the name

    I'm trying to put movies onto my hard  drive but i can't put the files with the same name onto the hard drive , finder won't let me change the name. What am i doing wrong?

    Make a new folder and put them in that different folder. Then the names can be the same as others already on your drive.

  • Save listbox items to file with date in filename

    Im trying to setup a small program to where when you save listbox items, it saves to a file with a specific name. All works fine, no problems.  What I need to do is hen you click save, it saves the file with the specific name BUT with the date &
    time added to the filename. 
    Example: filename-date-time.txt
    Currently, Im only able to save as  filename.txt
    So when you save the list again, it just overwrites the file already there.
    Here is what I have:
    IO.Directory.CreateDirectory("C:\foldername")
    Dim w As New IO.StreamWriter("C:\foldername\filename.txt")
    Dim i As Integer
    For i = 0 To ListBox1.Items.Count - 1
    w.WriteLine(ListBox1.Items.Item(i))
    Next
    w.Close()
    MsgBox("List has been saved to C:\foldername\filename.txt", MsgBoxStyle.OkOnly)
    What do I need to add to this line: Dim w As New IO.StreamWriter("C:\foldername\filename.txt")   So that it can save it with the date & time?

    Dim w As New IO.StreamWriter("C:\foldername\filename " & Now.ToString(" MM/dd/yyyy hh:mm:ssf") & ".txt")
    Custom Date and Time Format Strings
    Format specifier
    Description
    Examples
    "d"
    The day of the month, from 1 through 31.
    More information:
    The "d" Custom Format Specifier.
    2009-06-01T13:45:30 -> 1
    2009-06-15T13:45:30 -> 15
    "dd"
    The day of the month, from 01 through 31.
    More information:
    The "dd" Custom Format Specifier.
    2009-06-01T13:45:30 -> 01
    2009-06-15T13:45:30 -> 15
    "ddd"
    The abbreviated name of the day of the week.
    More information:
    The "ddd" Custom Format Specifier.
    2009-06-15T13:45:30 -> Mon (en-US)
    2009-06-15T13:45:30 -> Пн (ru-RU)
    2009-06-15T13:45:30 -> lun. (fr-FR)
    "dddd"
    The full name of the day of the week.
    More information:
    The "dddd" Custom Format Specifier.
    2009-06-15T13:45:30 -> Monday (en-US)
    2009-06-15T13:45:30 -> понедельник (ru-RU)
    2009-06-15T13:45:30 -> lundi (fr-FR)
    "f"
    The tenths of a second in a date and time value.
    More information:
    The "f" Custom Format Specifier.
    2009-06-15T13:45:30.6170000 -> 6
    2009-06-15T13:45:30.05 -> 0
    "ff"
    The hundredths of a second in a date and time value.
    More information:
    The "ff" Custom Format Specifier.
    2009-06-15T13:45:30.6170000 -> 61
    2009-06-15T13:45:30.0500000 -> 00
    "fff"
    The milliseconds in a date and time value.
    More information:
    The "fff" Custom Format Specifier.
    6/15/2009 13:45:30.617 -> 617
    6/15/2009 13:45:30.0005 -> 000
    "ffff"
    The ten thousandths of a second in a date and time value.
    More information:
    The "ffff" Custom Format Specifier.
    2009-06-15T13:45:30.6175000 -> 6175
    2009-06-15T13:45:30.0000500  -> 0000
    "fffff"
    The hundred thousandths of a second in a date and time value.
    More information:
    The "fffff" Custom Format Specifier.
    2009-06-15T13:45:30.6175400 -> 61754
    6/15/2009 13:45:30.000005 -> 00000
    "ffffff"
    The millionths of a second in a date and time value.
    More information:
    The "ffffff" Custom Format Specifier.
    2009-06-15T13:45:30.6175420 -> 617542
    2009-06-15T13:45:30.0000005 -> 000000
    "fffffff"
    The ten millionths of a second in a date and time value.
    More information:
    The "fffffff" Custom Format Specifier.
    2009-06-15T13:45:30.6175425 -> 6175425
    2009-06-15T13:45:30.0001150 -> 0001150
    "F"
    If non-zero, the tenths of a second in a date and time value.
    More information:
    The "F" Custom Format Specifier.
    2009-06-15T13:45:30.6170000 -> 6
    2009-06-15T13:45:30.0500000 -> (no output)
    "FF"
    If non-zero, the hundredths of a second in a date and time value.
    More information:
    The "FF" Custom Format Specifier.
    2009-06-15T13:45:30.6170000 -> 61
    2009-06-15T13:45:30.0050000 -> (no output)
    "FFF"
    If non-zero, the milliseconds in a date and time value.
    More information:
    The "FFF" Custom Format Specifier.
    2009-06-15T13:45:30.6170000 -> 617
    2009-06-15T13:45:30.0005000 -> (no output)
    "FFFF"
    If non-zero, the ten thousandths of a second in a date and time value.
    More information:
    The "FFFF" Custom Format Specifier.
    2009-06-15T13:45:30.5275000 -> 5275
    2009-06-15T13:45:30.0000500 -> (no output)
    "FFFFF"
    If non-zero, the hundred thousandths of a second in a date and time value.
    More information:
    The "FFFFF" Custom Format Specifier.
    2009-06-15T13:45:30.6175400 -> 61754
    2009-06-15T13:45:30.0000050 -> (no output)
    "FFFFFF"
    If non-zero, the millionths of a second in a date and time value.
    More information:
    The "FFFFFF" Custom Format Specifier.
    2009-06-15T13:45:30.6175420 -> 617542
    2009-06-15T13:45:30.0000005 -> (no output)
    "FFFFFFF"
    If non-zero, the ten millionths of a second in a date and time value.
    More information:
    The "FFFFFFF" Custom Format Specifier.
    2009-06-15T13:45:30.6175425 -> 6175425
    2009-06-15T13:45:30.0001150 -> 000115
    "g", "gg"
    The period or era.
    More information:
    The "g" or "gg" Custom Format Specifier.
    2009-06-15T13:45:30.6170000 -> A.D.
    "h"
    The hour, using a 12-hour clock from 1 to 12.
    More information:
    The "h" Custom Format Specifier.
    2009-06-15T01:45:30 -> 1
    2009-06-15T13:45:30 -> 1
    "hh"
    The hour, using a 12-hour clock from 01 to 12.
    More information:
    The "hh" Custom Format Specifier.
    2009-06-15T01:45:30 -> 01
    2009-06-15T13:45:30 -> 01
    "H"
    The hour, using a 24-hour clock from 0 to 23.
    More information:
    The "H" Custom Format Specifier.
    2009-06-15T01:45:30 -> 1
    2009-06-15T13:45:30 -> 13
    "HH"
    The hour, using a 24-hour clock from 00 to 23.
    More information:
    The "HH" Custom Format Specifier.
    2009-06-15T01:45:30 -> 01
    2009-06-15T13:45:30 -> 13
    "K"
    Time zone information.
    More information:
    The "K" Custom Format Specifier.
    With DateTime values:
    2009-06-15T13:45:30, Kind Unspecified ->
    2009-06-15T13:45:30, Kind Utc -> Z
    2009-06-15T13:45:30, Kind Local -> -07:00 (depends on local computer settings)
    With DateTimeOffset values:
    2009-06-15T01:45:30-07:00 --> -07:00
    2009-06-15T08:45:30+00:00 --> +00:00
    "m"
    The minute, from 0 through 59.
    More information:
    The "m" Custom Format Specifier.
    2009-06-15T01:09:30 -> 9
    2009-06-15T13:29:30 -> 29
    "mm"
    The minute, from 00 through 59.
    More information:
    The "mm" Custom Format Specifier.
    2009-06-15T01:09:30 -> 09
    2009-06-15T01:45:30 -> 45
    "M"
    The month, from 1 through 12.
    More information:
    The "M" Custom Format Specifier.
    2009-06-15T13:45:30 -> 6
    "MM"
    The month, from 01 through 12.
    More information:
    The "MM" Custom Format Specifier.
    2009-06-15T13:45:30 -> 06
    "MMM"
    The abbreviated name of the month.
    More information:
    The "MMM" Custom Format Specifier.
    2009-06-15T13:45:30 -> Jun (en-US)
    2009-06-15T13:45:30 -> juin (fr-FR)
    2009-06-15T13:45:30 -> Jun (zu-ZA)
    "MMMM"
    The full name of the month.
    More information:
    The "MMMM" Custom Format Specifier.
    2009-06-15T13:45:30 -> June (en-US)
    2009-06-15T13:45:30 -> juni (da-DK)
    2009-06-15T13:45:30 -> uJuni (zu-ZA)
    "s"
    The second, from 0 through 59.
    More information:
    The "s" Custom Format Specifier.
    2009-06-15T13:45:09 -> 9
    "ss"
    The second, from 00 through 59.
    More information:
    The "ss" Custom Format Specifier.
    2009-06-15T13:45:09 -> 09
    "t"
    The first character of the AM/PM designator.
    More information:
    The "t" Custom Format Specifier.
    2009-06-15T13:45:30 -> P (en-US)
    2009-06-15T13:45:30 -> 午 (ja-JP)
    2009-06-15T13:45:30 ->  (fr-FR)
    "tt"
    The AM/PM designator.
    More information:
    The "tt" Custom Format Specifier.
    2009-06-15T13:45:30 -> PM (en-US)
    2009-06-15T13:45:30 -> 午後 (ja-JP)
    2009-06-15T13:45:30 ->  (fr-FR)
    "y"
    The year, from 0 to 99.
    More information:
    The "y" Custom Format Specifier.
    0001-01-01T00:00:00 -> 1
    0900-01-01T00:00:00 -> 0
    1900-01-01T00:00:00 -> 0
    2009-06-15T13:45:30 -> 9
    2019-06-15T13:45:30 -> 19
    "yy"
    The year, from 00 to 99.
    More information:
    The "yy" Custom Format Specifier.
    0001-01-01T00:00:00 -> 01
    0900-01-01T00:00:00 -> 00
    1900-01-01T00:00:00 -> 00
    2019-06-15T13:45:30 -> 19
    "yyy"
    The year, with a minimum of three digits.
    More information:
    The "yyy" Custom Format Specifier.
    0001-01-01T00:00:00 -> 001
    0900-01-01T00:00:00 -> 900
    1900-01-01T00:00:00 -> 1900
    2009-06-15T13:45:30 -> 2009
    "yyyy"
    The year as a four-digit number.
    More information:
    The "yyyy" Custom Format Specifier.
    0001-01-01T00:00:00 -> 0001
    0900-01-01T00:00:00 -> 0900
    1900-01-01T00:00:00 -> 1900
    2009-06-15T13:45:30 -> 2009
    "yyyyy"
    The year as a five-digit number.
    More information:
    The "yyyyy" Custom Format Specifier.
    0001-01-01T00:00:00 -> 00001
    2009-06-15T13:45:30 -> 02009
    "z"
    Hours offset from UTC, with no leading zeros.
    More information:
    The "z" Custom Format Specifier.
    2009-06-15T13:45:30-07:00 -> -7
    "zz"
    Hours offset from UTC, with a leading zero for a single-digit value.
    More information:
    The "zz" Custom Format Specifier.
    2009-06-15T13:45:30-07:00 -> -07
    "zzz"
    Hours and minutes offset from UTC.
    More information:
    The "zzz" Custom Format Specifier.
    2009-06-15T13:45:30-07:00 -> -07:00
    The time separator.
    More information:
    The ":" Custom Format Specifier.
    2009-06-15T13:45:30 -> : (en-US)
    2009-06-15T13:45:30 -> . (it-IT)
    2009-06-15T13:45:30 -> : (ja-JP)
    The date separator.
    More Information:
    The "/" Custom Format Specifier.
    2009-06-15T13:45:30 -> / (en-US)
    2009-06-15T13:45:30 -> - (ar-DZ)
    2009-06-15T13:45:30 -> . (tr-TR)
    "string"
    'string'
    Literal string delimiter.
    2009-06-15T13:45:30 ("arr:" h:m t) -> arr: 1:45 P
    2009-06-15T13:45:30 ('arr:' h:m t) -> arr: 1:45 P
    Defines the following character as a custom format specifier.
    More information: Using Single Custom Format Specifiers.
    2009-06-15T13:45:30 (%h) -> 1
    The escape character.
    2009-06-15T13:45:30 (h \h) -> 1 h
    Any other character
    The character is copied to the result string unchanged.
    More information:
    Using the Escape Character.
    2009-06-15T01:45:30 (arr hh:mm t) -> arr 01:45 A
    La vida loca
    gives error when trying save.
    The given path's format is not supported.

  • How to copy a files spotlight comments for an entire folder and place them in a different file with that same name

    I have the same question in a different discussion but I already marked it as solved because one of the questions was answered. Here's the linke to the other discussion if your interested https://discussions.apple.com/thread/5970421 
    I have movie covers saved as a jpeg for every movie my family and I own. There is about 700 and they each have a comment of the main actors, release dates, and descriptions. This makes it easy to find what to watch.Is there an applescript, automator, program I can download,  or program code supported in xcode that will do the following set of inscructions?
    Take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments to a file with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste
    and do this for all 700 files

    Clendenen02 wrote:
    where should I run the code? in the terminal, or an applescript, or should put it in xcode and run it from there or the terminal.
    What MrHoffman said.
    But if it's easier, you can wrap it in Automator and have Automator ask for the Folders: (Test on a sample of your files before running on all 700 files)
    (do you really own 700 movies??)
    The Workflow is:
    Put this in the Run Shell Script Action (and pass input as arguments":
    PicDir=$1
    MovDir=$2
    for f in $PicDir/*
    do
         if [ ! -d "$f" -a "${f##*.}" = "jpeg" ]; then
              comment=$(mdls -raw -name kMDItemFinderComment "$f")
              if [[ $comment != "(null)" ]]; then
                   picname=${f##*/}
                   movname=${picname%.*}.m4v
                   if [[ -e "$MovDir"/$movname ]]; then
    osascript <<-EOF
    tell application "Finder"
    set comment of file (POSIX file "$MovDir/$movname") to  "$comment"
    end tell
    EOF
                   fi
              fi
         fi
    done
    (BTW, I know that this is a bit of sloppy scripting (wraping an osascript in a Bash Script wrapped in Automator, but it does what you need)

  • Compressor crash when attempting import files with 00* in name

    I produce several short video files every day and name them using a sequential five digit numerical naming convention.
    I'm finding that whenever I'm near, at or shortly after crossing a 100 mark Compressor crashes when I try and import single files with the following filenames (these are the most recent examples):
    20993
    21000
    21001
    21005
    The only way to import these problematic files is to select the file before, or after, then Command click on the filename causing the crash. Click Open to import both into the batch, and then click on the file I first clicked on and hit Delete to remove it from the batch, leaving the file with the problematic name.
    For Example. I want to import 21005 into Compressor for processing, but every time I try and import it Compressor crashes. So I re-launch Compressor, click the little Q button and click on 21004, then press Command and click on 21005. Click Open, import window goes away to reveal the Batch window. Click on 21004, press Delete button on keyboard leaving me with the file that was causing the crash.
    FWIW apart from the file duration/size, there's no difference between these files. In fact I can change the names and the files that used to import fine now crash Compressor when attempt to import with any of the filenames above.
    Here's the info behind two of the problem files and also that of the two adjacent files that import fine:
    (all files: Dimension: 720 x 480. Codecs: DV/DVCPRO - NTSC. Channel Count: 2. Kind: Final Cut Pro Movie File. No color labels.
    20999 (Imports Fine):
    File Size: 394,475,469 bytes
    Duration: 01'44
    21000 (Compressor Crasher):
    File Size: 324,052,925 bytes
    Duration: 01'26
    21001 (Compressor Crasher):
    File Size: 339.730.909 bytes
    Duration: 01'30
    21002 (Imports Fine):
    File Size: 348,707,181 bytes
    Duration: 01'32
    Compressor 2 - 2.0.1
    Dual 2 GHz PowerPC G5
    1.5 B DDR SDRAM
    Mac OS X 10.4.8

    Hello,
    Thanks for the replies/info.
    Yes the Panther and Jaguar install disks are retail versions, not specific machine versions. And the Jaguar ones worked for the Powerbook before.
    The Powerbook I have is the Firewire 500mhz one, Pismo I think it's called. The hard drive is a 60GB one. I didn't have to partition it before.
    Reviewing all the above, it would appear that the problem is me not being able to use an internal, built in CD/DVD drive to install from this time? The only other thing it could be I think is the crash I recently had has had some bad effect -- but that's unlikely right? So, I need to get a new DVD drive? Or is there any other way to get the OS onto the Powerbook without getting another internal DVD/CD drive? Is there anyway to install onto the PB from another machine maybe?
    Does that sound right?: not being able to use internal DVD/CD drive is the source of my current problem?
    Thanks.

  • For each loop in case of more file with the same name

    Hi, guys how works ForEachLoop in case of double file? Let's say that we got five excel file. A.xls, B.xls, C.xls, D.xls, A.xls. We got two file with A.xls. I'm going to assume that both file will be loaded. It's correct? 
    I'm asking this because I need to check if I got two file with the same name ( I got hundreds of file to load). And in the same time I need to avoid to load two file with the same title ( cause I could double the data)

    If there are duplicate file names in subfolders then you should fill the variable with the complete path. See C in this images:
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • How do I make Applescript to compress 2 filez with the same name?

    Hello guys and thank you for reading this!
    I don't know a lot about programming, but i believe applescript can save my life. What I need is.
    Detecting 2 files with the same name, but differnt extension. (song 1.jpg, song 1.mp3)
    Compressing those 2 files into a single .zip (In the end I would have song 1.jpg, song 1.mp3 and song 1.zip
    And that's it! I know its pretty simple, and I've seen the "Create Archive" in automator, but I don't really know how to tell him which files to Compress.
    Thanks again!

    Hi,
    Try this script :
    set sourceFolder to choose folder
    tell application "System Events"
          {name, name extension} of (files of sourceFolder whose name extension is not "zip")
          my compress2FilesSameName(the result, sourceFolder as string)
          repeat with i in (get folders of sourceFolder) --check in subfolders
                {name, name extension} of (files of i whose name extension is not "zip")
                my compress2FilesSameName(the result, path of i)
          end repeat
    end tell
    on compress2FilesSameName(tList, tFolder)
          set tnames to item 1 of tList
          set tExtensions to item 2 of tList
          set tc to count tnames
          set j to 1
          repeat while j < tc
                tell (item j of tExtensions) to if it is not missing value or it is not "" then
                      set n1 to (count) + 2
                else
                      set n1 to 1
                end if
                tell (item (j + 1) of tExtensions) to if it is not missing value or it is not "" then
                      set n2 to (count) + 2
                else
                      set n2 to 1
                end if
                set name1 to item j of tnames
                set name2 to item (j + 1) of tnames
                if (text 1 thru -n1 of name1) = (text 1 thru -n2 of name2) then -- same name
                      set tFile1 to quoted form of POSIX path of (tFolder & name1)
                      set tFile2 to quoted form of POSIX path of (tFolder & name2)
                      set zipFile to quoted form of POSIX path of (tFolder & (text 1 thru -n1 of name1) & ".zip")
                      do shell script "/usr/bin/zip -j  " & zipFile & " " & tFile1 & " " & tFile2
                      set j to j + 2
                else
                      set j to j + 1
                end if
          end repeat
    end compress2FilesSameName
    if an archive already exists with the same name (in the parent folder of the files to compress) , the ZIP command overwrite this ".zip" file.
    Example  with "song 1.jpg", "song 1.mp3" and "song 1.zip" :
    If "song 1.zip" doesn't exist, the ZIP command create the "song 1.zip" file.
    If "song 1.zip" exist, the ZIP command overwrite the "song 1.zip" file (it will not create a new archive).

  • How to delete the file with space in name

    Hi
    I want to delete the file "test ex.txt" file.
    i run the following command in command prompt.i can delete the file successfully.
    /bin/rm -f /mnt/"test ex.txt"
    I want to run the command from java.So i am using the following code
    String cmd = "/bin/rm -f /mnt/\"test ex.txt\"";
         Runtime rt = Runtime.getRuntime();
    process = rt.exec(cmd);
    The file was not deleted.
    How to delete the file with space in name?
    Help me

    Use the form of exec that takes an array of command + args.
    arr[0] = "/bin/rm"
    arr[1] = "-f"
    arr[2] = "/home/me/some directory with spaces";Or use ProcessBuilder, which is the preferred replacement for Runtime.exec, and which Runtime.exec calls.

Maybe you are looking for

  • Setting audio BG on 3&4

    I am trying to set up BG audio on 3 or 3 &4 but can't seem to hear it. Can someone help. Thanks Jeff

  • Is it possible to charge Ipod5G in Windows 2000 after ejecting from Itunes?

    Is it possible to charge Ipod5G in Windows 2000 after ejecting from Itunes? but keeping it connected? I'm using a fairly powerful and new computer at work...loaded with Win2K (2000), and for some reason it doesnt want to charge once I've ejected it f

  • Exs24 edit window not opening

    I've checked the advanced tools and audio options within preferences to get the edit button to show up. However, when I click on the edit button, it lights red to register the click but the windows to drag in my own samples doesn't appear?! Ay ideas?

  • N6030 Searching for contact by name to send messag...

    I used to be able to search for the contact by name to send a message. Now a 123 icon appears top left and the keypad only accepts numbers for the search. Any ideas about how to turn it back to letters? Thanks in anticipation for your help.

  • Reverting to original filename issue

    Still pretty new to Lightroom and I made a workflow error that I cannot seem to fix. Wondering if anyone had any thoughts. When I import I put original files on my working drive and my backup drive. I then work off the working drive editing. When don